Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / cc / trees / thread_proxy.h
index 8d4348e..1621ebc 100644 (file)
@@ -39,6 +39,7 @@ class CC_EXPORT ThreadProxy : public Proxy,
  public:
   static scoped_ptr<Proxy> Create(
       LayerTreeHost* layer_tree_host,
+      scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
       scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
 
   virtual ~ThreadProxy();
@@ -47,6 +48,7 @@ class CC_EXPORT ThreadProxy : public Proxy,
     BeginMainFrameAndCommitState();
     ~BeginMainFrameAndCommitState();
 
+    unsigned int begin_frame_id;
     base::TimeTicks monotonic_frame_begin_time;
     scoped_ptr<ScrollAndScaleSet> scroll_info;
     size_t memory_allocation_limit_bytes;
@@ -92,10 +94,11 @@ class CC_EXPORT ThreadProxy : public Proxy,
     base::TimeTicks last_monotonic_frame_begin_time;
   };
 
-  struct ReadbackRequest;
-
   struct CompositorThreadOnly {
-    CompositorThreadOnly(ThreadProxy* proxy, int layer_tree_host_id);
+    CompositorThreadOnly(
+        ThreadProxy* proxy,
+        int layer_tree_host_id,
+        RenderingStatsInstrumentation* rendering_stats_instrumentation);
     ~CompositorThreadOnly();
 
     const int layer_tree_host_id;
@@ -166,10 +169,10 @@ class CC_EXPORT ThreadProxy : public Proxy,
   virtual void Stop() OVERRIDE;
   virtual size_t MaxPartialTextureUpdates() const OVERRIDE;
   virtual void ForceSerializeOnSwapBuffers() OVERRIDE;
+  virtual bool SupportsImplScrolling() const OVERRIDE;
   virtual void SetDebugState(const LayerTreeDebugState& debug_state) OVERRIDE;
-  virtual scoped_ptr<base::Value> AsValue() const OVERRIDE;
-  virtual bool CommitPendingForTesting() OVERRIDE;
-  virtual scoped_ptr<base::Value> SchedulerAsValueForTesting() OVERRIDE;
+  virtual void AsValueInto(base::debug::TracedValue* value) const OVERRIDE;
+  virtual bool MainFrameWillHappenForTesting() OVERRIDE;
 
   // LayerTreeHostImplClient implementation
   virtual void UpdateRendererCapabilitiesOnImplThread() OVERRIDE;
@@ -203,7 +206,7 @@ class CC_EXPORT ThreadProxy : public Proxy,
   virtual void PostDelayedScrollbarFadeOnImplThread(
       const base::Closure& start_fade,
       base::TimeDelta delay) OVERRIDE;
-  virtual void DidActivatePendingTree() OVERRIDE;
+  virtual void DidActivateSyncTree() OVERRIDE;
   virtual void DidManageTiles() OVERRIDE;
 
   // SchedulerClient implementation
@@ -215,7 +218,7 @@ class CC_EXPORT ThreadProxy : public Proxy,
   virtual void ScheduledActionAnimate() OVERRIDE;
   virtual void ScheduledActionCommit() OVERRIDE;
   virtual void ScheduledActionUpdateVisibleTiles() OVERRIDE;
-  virtual void ScheduledActionActivatePendingTree() OVERRIDE;
+  virtual void ScheduledActionActivateSyncTree() OVERRIDE;
   virtual void ScheduledActionBeginOutputSurfaceCreation() OVERRIDE;
   virtual void ScheduledActionManageTiles() OVERRIDE;
   virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) OVERRIDE;
@@ -229,6 +232,7 @@ class CC_EXPORT ThreadProxy : public Proxy,
 
  protected:
   ThreadProxy(LayerTreeHost* layer_tree_host,
+              scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
               scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
 
  private:
@@ -247,7 +251,6 @@ class CC_EXPORT ThreadProxy : public Proxy,
   void SendCommitRequestToImplThreadIfNeeded();
 
   // Called on impl thread.
-  struct CommitPendingRequest;
   struct SchedulerStateRequest;
 
   void StartCommitOnImplThread(CompletionEvent* completion,
@@ -268,11 +271,10 @@ class CC_EXPORT ThreadProxy : public Proxy,
   void LayerTreeHostClosedOnImplThread(CompletionEvent* completion);
   DrawResult DrawSwapInternal(bool forced_draw);
   void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion);
-  void CheckOutputSurfaceStatusOnImplThread();
-  void CommitPendingOnImplThreadForTesting(CommitPendingRequest* request);
-  void SchedulerAsValueOnImplThreadForTesting(SchedulerStateRequest* request);
+  void MainFrameWillHappenOnImplThreadForTesting(CompletionEvent* completion,
+                                                 bool* main_frame_will_happen);
   void AsValueOnImplThread(CompletionEvent* completion,
-                           base::DictionaryValue* state) const;
+                           base::debug::TracedValue* state) const;
   void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile);
   void MainThreadHasStoppedFlingingOnImplThread();
   void SetInputThrottledUntilCommitOnImplThread(bool is_throttled);