X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcc%2Ftrees%2Fthread_proxy.h;h=b0275b91969c65595de30ff284929f50b0bb0341;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=c11f74343af250317eace432aecad9b8e32be12a;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/cc/trees/thread_proxy.h b/src/cc/trees/thread_proxy.h index c11f743..b0275b9 100644 --- a/src/cc/trees/thread_proxy.h +++ b/src/cc/trees/thread_proxy.h @@ -13,10 +13,10 @@ #include "cc/animation/animation_events.h" #include "cc/base/completion_event.h" #include "cc/resources/resource_update_controller.h" -#include "cc/scheduler/rolling_time_delta_history.h" #include "cc/scheduler/scheduler.h" #include "cc/trees/layer_tree_host_impl.h" #include "cc/trees/proxy.h" +#include "cc/trees/proxy_timing_history.h" namespace base { class SingleThreadTaskRunner; @@ -71,6 +71,7 @@ class ThreadProxy : public Proxy, virtual scoped_ptr SchedulerStateAsValueForTesting() OVERRIDE; // LayerTreeHostImplClient implementation + virtual void UpdateRendererCapabilitiesOnImplThread() OVERRIDE; virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; virtual void DidSwapBuffersOnImplThread() OVERRIDE {} virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE; @@ -139,6 +140,8 @@ class ThreadProxy : public Proxy, }; // Called on main thread. + void SetRendererCapabilitiesMainThreadCopy( + const RendererCapabilities& capabilities); void BeginMainFrame( scoped_ptr begin_main_frame_state); void DidCommitAndDrawFrame(); @@ -167,8 +170,7 @@ class ThreadProxy : public Proxy, void BeginMainFrameAbortedOnImplThread(bool did_handle); void RequestReadbackOnImplThread(ReadbackRequest* request); void FinishAllRenderingOnImplThread(CompletionEvent* completion); - void InitializeImplOnImplThread(CompletionEvent* completion, - int layer_tree_host_id); + void InitializeImplOnImplThread(CompletionEvent* completion); void SetLayerTreeHostClientReadyOnImplThread(); void SetVisibleOnImplThread(CompletionEvent* completion, bool visible); void UpdateBackgroundAnimateTicking(); @@ -246,6 +248,8 @@ class ThreadProxy : public Proxy, LayerTreeHost* layer_tree_host; bool commit_waits_for_activation; bool main_thread_inside_commit; + + base::TimeTicks last_monotonic_frame_begin_time; }; // Use accessors instead of this variable directly. MainThreadOrBlockedMainThread main_thread_or_blocked_vars_unsafe_; @@ -253,9 +257,11 @@ class ThreadProxy : public Proxy, const MainThreadOrBlockedMainThread& blocked_main() const; struct CompositorThreadOnly { - explicit CompositorThreadOnly(ThreadProxy* proxy); + CompositorThreadOnly(ThreadProxy* proxy, int layer_tree_host_id); ~CompositorThreadOnly(); + const int layer_tree_host_id; + // Copy of the main thread side contents texture manager for work // that needs to be done on the compositor thread. PrioritizedResourceManager* contents_texture_manager; @@ -288,18 +294,14 @@ class ThreadProxy : public Proxy, bool input_throttled_until_commit; + // Set when we freeze animations to avoid checkerboarding. + bool animations_frozen_until_next_draw; + base::TimeTicks animation_freeze_time; + base::TimeTicks smoothness_takes_priority_expiration_time; bool renew_tree_priority_pending; - RollingTimeDeltaHistory draw_duration_history; - RollingTimeDeltaHistory begin_main_frame_to_commit_duration_history; - RollingTimeDeltaHistory commit_to_activate_duration_history; - - // Used for computing samples added to - // begin_main_frame_to_commit_duration_history_ and - // activation_duration_history_. - base::TimeTicks begin_main_frame_sent_time; - base::TimeTicks commit_complete_time; + ProxyTimingHistory timing_history; scoped_ptr layer_tree_host_impl; base::WeakPtrFactory weak_factory;