summaryrefslogtreecommitdiffstats
path: root/cc/trees
diff options
context:
space:
mode:
authorbrianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-19 03:54:35 +0000
committerbrianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-19 03:54:35 +0000
commitdf3c24c9b6d9b01358f517ae77046e65f39b40f3 (patch)
treee9929f8a6ad054b41c24bec820004cc5f8e79413 /cc/trees
parent5a8ccdae65377d0d2917dee3d4a6f14128594be6 (diff)
downloadchromium_src-df3c24c9b6d9b01358f517ae77046e65f39b40f3.zip
chromium_src-df3c24c9b6d9b01358f517ae77046e65f39b40f3.tar.gz
chromium_src-df3c24c9b6d9b01358f517ae77046e65f39b40f3.tar.bz2
cc: Add BeginFrameArgs
In addition to the frame_time, include a deadline and interval with BeginFrame. Values used are placeholders for now, but will be used in the near future. BUG=240945 Review URL: https://chromiumcodereview.appspot.com/17391006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207166 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/trees')
-rw-r--r--cc/trees/layer_tree_host_impl.cc6
-rw-r--r--cc/trees/layer_tree_host_impl.h5
-rw-r--r--cc/trees/layer_tree_host_impl_unittest.cc3
-rw-r--r--cc/trees/layer_tree_host_unittest.cc1
-rw-r--r--cc/trees/single_thread_proxy.h3
-rw-r--r--cc/trees/thread_proxy.cc4
-rw-r--r--cc/trees/thread_proxy.h2
7 files changed, 14 insertions, 10 deletions
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index e4ca7e4..fe7589b 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1072,8 +1072,8 @@ void LayerTreeHostImpl::SetNeedsRedrawRect(gfx::Rect damage_rect) {
client_->SetNeedsRedrawRectOnImplThread(damage_rect);
}
-void LayerTreeHostImpl::BeginFrame(base::TimeTicks frame_time) {
- client_->BeginFrameOnImplThread(frame_time);
+void LayerTreeHostImpl::BeginFrame(const BeginFrameArgs& args) {
+ client_->BeginFrameOnImplThread(args);
}
void LayerTreeHostImpl::OnSwapBuffersComplete(
@@ -1526,7 +1526,7 @@ bool LayerTreeHostImpl::DoInitializeRenderer(
int max_frames_pending =
output_surface->capabilities().max_frames_pending;
if (max_frames_pending <= 0)
- max_frames_pending = FrameRateController::DEFAULT_MAX_FRAMES_PENDING;
+ max_frames_pending = OutputSurface::DEFAULT_MAX_FRAMES_PENDING;
output_surface->SetMaxFramesPending(max_frames_pending);
output_surface_ = output_surface.Pass();
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index a5019ae..015a2f2 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -19,6 +19,7 @@
#include "cc/input/top_controls_manager_client.h"
#include "cc/layers/layer_lists.h"
#include "cc/layers/render_pass_sink.h"
+#include "cc/output/begin_frame_args.h"
#include "cc/output/output_surface_client.h"
#include "cc/output/renderer.h"
#include "cc/quads/render_pass.h"
@@ -54,7 +55,7 @@ class LayerTreeHostImplClient {
scoped_refptr<ContextProvider> offscreen_context_provider) = 0;
virtual void DidLoseOutputSurfaceOnImplThread() = 0;
virtual void OnSwapBuffersCompleteOnImplThread() = 0;
- virtual void BeginFrameOnImplThread(base::TimeTicks frame_time) = 0;
+ virtual void BeginFrameOnImplThread(const BeginFrameArgs& args) = 0;
virtual void OnCanDrawStateChanged(bool can_draw) = 0;
virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) = 0;
virtual void SetNeedsRedrawOnImplThread() = 0;
@@ -201,7 +202,7 @@ class CC_EXPORT LayerTreeHostImpl
virtual bool DeferredInitialize(
scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE;
virtual void SetNeedsRedrawRect(gfx::Rect rect) OVERRIDE;
- virtual void BeginFrame(base::TimeTicks frame_time)
+ virtual void BeginFrame(const BeginFrameArgs& args)
OVERRIDE;
virtual void SetExternalDrawConstraints(const gfx::Transform& transform,
gfx::Rect viewport) OVERRIDE;
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index b8b320c..e292026 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -22,6 +22,7 @@
#include "cc/layers/texture_layer_impl.h"
#include "cc/layers/tiled_layer_impl.h"
#include "cc/layers/video_layer_impl.h"
+#include "cc/output/begin_frame_args.h"
#include "cc/output/compositor_frame_ack.h"
#include "cc/output/compositor_frame_metadata.h"
#include "cc/output/gl_renderer.h"
@@ -95,7 +96,7 @@ class LayerTreeHostImplTest : public testing::Test,
}
virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE {}
virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE {}
- virtual void BeginFrameOnImplThread(base::TimeTicks frame_time)
+ virtual void BeginFrameOnImplThread(const BeginFrameArgs& args)
OVERRIDE {}
virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE {
on_can_draw_state_changed_called_ = true;
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index f4d245b..0efcaaa 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -15,6 +15,7 @@
#include "cc/layers/layer_impl.h"
#include "cc/layers/picture_layer.h"
#include "cc/layers/scrollbar_layer.h"
+#include "cc/output/begin_frame_args.h"
#include "cc/output/copy_output_request.h"
#include "cc/output/copy_output_result.h"
#include "cc/output/output_surface.h"
diff --git a/cc/trees/single_thread_proxy.h b/cc/trees/single_thread_proxy.h
index 9d995ba..0ed3798 100644
--- a/cc/trees/single_thread_proxy.h
+++ b/cc/trees/single_thread_proxy.h
@@ -9,6 +9,7 @@
#include "base/time.h"
#include "cc/animation/animation_events.h"
+#include "cc/output/begin_frame_args.h"
#include "cc/trees/layer_tree_host_impl.h"
#include "cc/trees/proxy.h"
@@ -51,7 +52,7 @@ class SingleThreadProxy : public Proxy, LayerTreeHostImplClient {
scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE;
virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE;
virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE {}
- virtual void BeginFrameOnImplThread(base::TimeTicks frame_time)
+ virtual void BeginFrameOnImplThread(const BeginFrameArgs& args)
OVERRIDE {}
virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE;
virtual void OnHasPendingTreeStateChanged(bool have_pending_tree) OVERRIDE;
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index a7c4086..b307c9e 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -362,10 +362,10 @@ void ThreadProxy::SetNeedsBeginFrameOnImplThread(bool enable) {
layer_tree_host_impl_->SetNeedsBeginFrame(enable);
}
-void ThreadProxy::BeginFrameOnImplThread(base::TimeTicks frame_time) {
+void ThreadProxy::BeginFrameOnImplThread(const BeginFrameArgs& args) {
DCHECK(IsImplThread());
TRACE_EVENT0("cc", "ThreadProxy::BeginFrameOnImplThread");
- scheduler_on_impl_thread_->BeginFrame(frame_time);
+ scheduler_on_impl_thread_->BeginFrame(args);
}
void ThreadProxy::OnCanDrawStateChanged(bool can_draw) {
diff --git a/cc/trees/thread_proxy.h b/cc/trees/thread_proxy.h
index db3a502..4f26d35 100644
--- a/cc/trees/thread_proxy.h
+++ b/cc/trees/thread_proxy.h
@@ -68,7 +68,7 @@ class ThreadProxy : public Proxy,
scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE;
virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE;
virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE;
- virtual void BeginFrameOnImplThread(base::TimeTicks frame_time) OVERRIDE;
+ virtual void BeginFrameOnImplThread(const BeginFrameArgs& args) OVERRIDE;
virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE;
virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) OVERRIDE;
virtual void SetNeedsRedrawOnImplThread() OVERRIDE;