[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 1 | // Copyright 2011 The Chromium Authors. All rights reserved. |
[email protected] | 0fb2500 | 2012-10-12 07:20:02 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 4 | |
[email protected] | 556fd29 | 2013-03-18 08:03:04 | [diff] [blame] | 5 | #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| 6 | #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 7 | |
[email protected] | bf691c2 | 2013-03-26 21:15:06 | [diff] [blame] | 8 | #include <string> |
| 9 | #include <vector> |
| 10 | |
[email protected] | c4040a52 | 2012-10-21 15:01:40 | [diff] [blame] | 11 | #include "base/basictypes.h" |
| 12 | #include "base/memory/scoped_ptr.h" |
| 13 | #include "base/time.h" |
[email protected] | 95e4e1a0 | 2013-03-18 07:09:09 | [diff] [blame] | 14 | #include "cc/animation/animation_events.h" |
| 15 | #include "cc/animation/animation_registrar.h" |
[email protected] | 681ccff | 2013-03-18 06:13:52 | [diff] [blame] | 16 | #include "cc/base/cc_export.h" |
[email protected] | e4c3c87a | 2013-04-22 02:28:40 | [diff] [blame] | 17 | #include "cc/debug/latency_info.h" |
[email protected] | 3052b10f | 2013-03-18 07:41:21 | [diff] [blame] | 18 | #include "cc/input/input_handler.h" |
[email protected] | 1960a71 | 2013-04-30 17:06:47 | [diff] [blame] | 19 | #include "cc/input/layer_scroll_offset_delegate.h" |
[email protected] | 3052b10f | 2013-03-18 07:41:21 | [diff] [blame] | 20 | #include "cc/input/top_controls_manager_client.h" |
[email protected] | 50761e9 | 2013-03-29 20:51:28 | [diff] [blame] | 21 | #include "cc/layers/layer_lists.h" |
[email protected] | cc3cfaa | 2013-03-18 09:05:52 | [diff] [blame] | 22 | #include "cc/layers/render_pass_sink.h" |
[email protected] | 7f0d825f | 2013-03-18 07:24:30 | [diff] [blame] | 23 | #include "cc/output/output_surface_client.h" |
| 24 | #include "cc/output/renderer.h" |
[email protected] | 89e8267a | 2013-03-18 07:50:56 | [diff] [blame] | 25 | #include "cc/quads/render_pass.h" |
[email protected] | e12dd0e | 2013-03-18 08:24:40 | [diff] [blame] | 26 | #include "cc/resources/tile_manager.h" |
[email protected] | b9dcf43a | 2013-01-09 00:15:29 | [diff] [blame] | 27 | #include "skia/ext/refptr.h" |
[email protected] | ddf9df8 | 2012-10-16 06:52:46 | [diff] [blame] | 28 | #include "third_party/skia/include/core/SkColor.h" |
[email protected] | b9dcf43a | 2013-01-09 00:15:29 | [diff] [blame] | 29 | #include "third_party/skia/include/core/SkPicture.h" |
[email protected] | 167ed9d5 | 2012-10-31 20:47:58 | [diff] [blame] | 30 | #include "ui/gfx/rect.h" |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 31 | |
| 32 | namespace cc { |
| 33 | |
[email protected] | 96baf3e | 2012-10-22 23:09:55 | [diff] [blame] | 34 | class CompletionEvent; |
[email protected] | bf189f6 | 2012-12-18 03:42:11 | [diff] [blame] | 35 | class CompositorFrameMetadata; |
[email protected] | 96baf3e | 2012-10-22 23:09:55 | [diff] [blame] | 36 | class DebugRectHistory; |
| 37 | class FrameRateCounter; |
[email protected] | 96baf3e | 2012-10-22 23:09:55 | [diff] [blame] | 38 | class LayerImpl; |
| 39 | class LayerTreeHostImplTimeSourceAdapter; |
[email protected] | 8bef4057 | 2012-12-11 21:38:08 | [diff] [blame] | 40 | class LayerTreeImpl; |
[email protected] | 96baf3e | 2012-10-22 23:09:55 | [diff] [blame] | 41 | class PageScaleAnimation; |
[email protected] | 0edbfbe9f | 2013-01-17 03:33:03 | [diff] [blame] | 42 | class PaintTimeCounter; |
[email protected] | 1191d9d | 2013-02-02 06:00:33 | [diff] [blame] | 43 | class MemoryHistory; |
[email protected] | 372bad5f | 2013-03-21 16:38:43 | [diff] [blame] | 44 | class RenderingStatsInstrumentation; |
[email protected] | 96baf3e | 2012-10-22 23:09:55 | [diff] [blame] | 45 | class RenderPassDrawQuad; |
| 46 | class ResourceProvider; |
[email protected] | 3ba4cae | 2013-01-16 03:58:38 | [diff] [blame] | 47 | class TopControlsManager; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 48 | struct RendererCapabilities; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 49 | |
[email protected] | 96baf3e | 2012-10-22 23:09:55 | [diff] [blame] | 50 | // LayerTreeHost->Proxy callback interface. |
| 51 | class LayerTreeHostImplClient { |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 52 | public: |
| 53 | virtual void DidLoseOutputSurfaceOnImplThread() = 0; |
| 54 | virtual void OnSwapBuffersCompleteOnImplThread() = 0; |
| 55 | virtual void OnVSyncParametersChanged(base::TimeTicks timebase, |
| 56 | base::TimeDelta interval) = 0; |
[email protected] | 7ed4751 | 2013-03-26 22:28:45 | [diff] [blame] | 57 | virtual void DidVSync(base::TimeTicks frame_time) = 0; |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 58 | virtual void OnCanDrawStateChanged(bool can_draw) = 0; |
| 59 | virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) = 0; |
| 60 | virtual void SetNeedsRedrawOnImplThread() = 0; |
[email protected] | 1cd9f555 | 2013-04-26 04:22:03 | [diff] [blame] | 61 | virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) = 0; |
[email protected] | 8612679 | 2013-03-16 20:07:54 | [diff] [blame] | 62 | virtual void DidInitializeVisibleTileOnImplThread() = 0; |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 63 | virtual void SetNeedsCommitOnImplThread() = 0; |
| 64 | virtual void SetNeedsManageTilesOnImplThread() = 0; |
| 65 | virtual void PostAnimationEventsToMainThreadOnImplThread( |
| 66 | scoped_ptr<AnimationEventsVector> events, |
| 67 | base::Time wall_clock_time) = 0; |
| 68 | // Returns true if resources were deleted by this call. |
| 69 | virtual bool ReduceContentsTextureMemoryOnImplThread( |
| 70 | size_t limit_bytes, |
| 71 | int priority_cutoff) = 0; |
| 72 | virtual void ReduceWastedContentsTextureMemoryOnImplThread() = 0; |
| 73 | virtual void SendManagedMemoryStats() = 0; |
| 74 | virtual bool IsInsideDraw() = 0; |
| 75 | virtual void RenewTreePriority() = 0; |
[email protected] | 0fc818e | 2013-03-18 06:45:20 | [diff] [blame] | 76 | virtual void RequestScrollbarAnimationOnImplThread(base::TimeDelta delay) = 0; |
[email protected] | ef915f53 | 2013-04-22 20:56:32 | [diff] [blame] | 77 | virtual void DidReceiveLastInputEventForVSync(base::TimeTicks frame_time) = 0; |
[email protected] | 2a61ad5 | 2013-05-13 14:01:29 | [diff] [blame] | 78 | virtual void DidActivatePendingTree() = 0; |
[email protected] | bf691c2 | 2013-03-26 21:15:06 | [diff] [blame] | 79 | |
| 80 | protected: |
| 81 | virtual ~LayerTreeHostImplClient() {} |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 82 | }; |
| 83 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 84 | // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering |
| 85 | // state. |
[email protected] | 200a9c06 | 2013-05-20 04:34:37 | [diff] [blame] | 86 | class CC_EXPORT LayerTreeHostImpl |
| 87 | : public InputHandler, |
| 88 | public RendererClient, |
| 89 | public TileManagerClient, |
| 90 | public OutputSurfaceClient, |
| 91 | public TopControlsManagerClient, |
| 92 | public base::SupportsWeakPtr<LayerTreeHostImpl> { |
[email protected] | e216fef0 | 2013-03-20 22:56:10 | [diff] [blame] | 93 | public: |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 94 | static scoped_ptr<LayerTreeHostImpl> Create( |
| 95 | const LayerTreeSettings& settings, |
| 96 | LayerTreeHostImplClient* client, |
[email protected] | 372bad5f | 2013-03-21 16:38:43 | [diff] [blame] | 97 | Proxy* proxy, |
| 98 | RenderingStatsInstrumentation* rendering_stats_instrumentation); |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 99 | virtual ~LayerTreeHostImpl(); |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 100 | |
[email protected] | 5ff3c978 | 2013-04-29 17:35:12 | [diff] [blame] | 101 | // InputHandler implementation |
[email protected] | 200a9c06 | 2013-05-20 04:34:37 | [diff] [blame] | 102 | virtual void BindToClient(InputHandlerClient* client) OVERRIDE; |
[email protected] | 5ff3c978 | 2013-04-29 17:35:12 | [diff] [blame] | 103 | virtual InputHandler::ScrollStatus ScrollBegin( |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 104 | gfx::Point viewport_point, |
[email protected] | 5ff3c978 | 2013-04-29 17:35:12 | [diff] [blame] | 105 | InputHandler::ScrollInputType type) OVERRIDE; |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 106 | virtual bool ScrollBy(gfx::Point viewport_point, |
| 107 | gfx::Vector2dF scroll_delta) OVERRIDE; |
[email protected] | be782f5 | 2013-03-23 21:36:14 | [diff] [blame] | 108 | virtual bool ScrollVerticallyByPage( |
| 109 | gfx::Point viewport_point, |
| 110 | WebKit::WebScrollbar::ScrollDirection direction) OVERRIDE; |
[email protected] | 1960a71 | 2013-04-30 17:06:47 | [diff] [blame] | 111 | virtual void SetRootLayerScrollOffsetDelegate( |
| 112 | LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) OVERRIDE; |
| 113 | virtual void OnRootLayerDelegatedScrollOffsetChanged() OVERRIDE; |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 114 | virtual void ScrollEnd() OVERRIDE; |
[email protected] | 5ff3c978 | 2013-04-29 17:35:12 | [diff] [blame] | 115 | virtual InputHandler::ScrollStatus FlingScrollBegin() OVERRIDE; |
[email protected] | 6e921bd | 2013-04-29 21:10:20 | [diff] [blame] | 116 | virtual void NotifyCurrentFlingVelocity(gfx::Vector2dF velocity) OVERRIDE; |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 117 | virtual void PinchGestureBegin() OVERRIDE; |
| 118 | virtual void PinchGestureUpdate(float magnify_delta, |
| 119 | gfx::Point anchor) OVERRIDE; |
| 120 | virtual void PinchGestureEnd() OVERRIDE; |
| 121 | virtual void StartPageScaleAnimation(gfx::Vector2d target_offset, |
| 122 | bool anchor_point, |
| 123 | float page_scale, |
| 124 | base::TimeTicks start_time, |
| 125 | base::TimeDelta duration) OVERRIDE; |
| 126 | virtual void ScheduleAnimation() OVERRIDE; |
| 127 | virtual bool HaveTouchEventHandlersAt(gfx::Point viewport_port) OVERRIDE; |
[email protected] | ef915f53 | 2013-04-22 20:56:32 | [diff] [blame] | 128 | virtual void DidReceiveLastInputEventForVSync( |
| 129 | base::TimeTicks frame_time) OVERRIDE; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 130 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 131 | // TopControlsManagerClient implementation. |
[email protected] | 59adb11 | 2013-04-09 04:48:44 | [diff] [blame] | 132 | virtual void DidChangeTopControlsPosition() OVERRIDE; |
| 133 | virtual bool HaveRootScrollLayer() const OVERRIDE; |
[email protected] | 3ba4cae | 2013-01-16 03:58:38 | [diff] [blame] | 134 | |
[email protected] | 0fc818e | 2013-03-18 06:45:20 | [diff] [blame] | 135 | void StartScrollbarAnimation(base::TimeTicks now); |
| 136 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 137 | struct CC_EXPORT FrameData : public RenderPassSink { |
| 138 | FrameData(); |
[email protected] | ca2902e9 | 2013-03-28 01:45:35 | [diff] [blame] | 139 | virtual ~FrameData(); |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 140 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 141 | std::vector<gfx::Rect> occluding_screen_space_rects; |
| 142 | std::vector<gfx::Rect> non_occluding_screen_space_rects; |
| 143 | RenderPassList render_passes; |
| 144 | RenderPassIdHashMap render_passes_by_id; |
[email protected] | 50761e9 | 2013-03-29 20:51:28 | [diff] [blame] | 145 | const LayerImplList* render_surface_layer_list; |
| 146 | LayerImplList will_draw_layers; |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 147 | bool contains_incomplete_tile; |
[email protected] | e034135 | 2013-04-06 05:01:20 | [diff] [blame] | 148 | bool has_no_damage; |
[email protected] | e4c3c87a | 2013-04-22 02:28:40 | [diff] [blame] | 149 | LatencyInfo latency_info; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 150 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 151 | // RenderPassSink implementation. |
| 152 | virtual void AppendRenderPass(scoped_ptr<RenderPass> render_pass) OVERRIDE; |
| 153 | }; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 154 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 155 | virtual void BeginCommit(); |
| 156 | virtual void CommitComplete(); |
| 157 | virtual void Animate(base::TimeTicks monotonic_time, |
| 158 | base::Time wall_clock_time); |
[email protected] | 3d9f743 | 2013-04-06 00:35:18 | [diff] [blame] | 159 | virtual void UpdateAnimationState(bool start_ready_animations); |
[email protected] | 200a9c06 | 2013-05-20 04:34:37 | [diff] [blame] | 160 | void MainThreadHasStoppedFlinging(); |
[email protected] | 3d9f743 | 2013-04-06 00:35:18 | [diff] [blame] | 161 | void UpdateBackgroundAnimateTicking(bool should_background_tick); |
[email protected] | b9d4a36 | 2013-04-23 05:36:27 | [diff] [blame] | 162 | void SetViewportDamage(gfx::Rect damage_rect); |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 163 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 164 | void ManageTiles(); |
[email protected] | 8947cbe | 2012-11-28 05:27:43 | [diff] [blame] | 165 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 166 | // Returns false if problems occured preparing the frame, and we should try |
[email protected] | ed511b8d | 2013-03-25 03:29:29 | [diff] [blame] | 167 | // to avoid displaying the frame. If PrepareToDraw is called, DidDrawAllLayers |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 168 | // must also be called, regardless of whether DrawLayers is called between the |
| 169 | // two. |
[email protected] | e034135 | 2013-04-06 05:01:20 | [diff] [blame] | 170 | virtual bool PrepareToDraw(FrameData* frame, |
| 171 | gfx::Rect device_viewport_damage_rect); |
[email protected] | f0c2a24 | 2013-03-15 19:34:52 | [diff] [blame] | 172 | virtual void DrawLayers(FrameData* frame, base::TimeTicks frame_begin_time); |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 173 | // Must be called if and only if PrepareToDraw was called. |
| 174 | void DidDrawAllLayers(const FrameData& frame); |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 175 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 176 | const LayerTreeSettings& settings() const { return settings_; } |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 177 | |
[email protected] | ffb2720f | 2013-03-15 19:18:37 | [diff] [blame] | 178 | // Returns the currently visible viewport size in DIP. This value excludes |
| 179 | // the URL bar and non-overlay scrollbars. |
| 180 | gfx::SizeF VisibleViewportSize() const; |
| 181 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 182 | // RendererClient implementation |
| 183 | private: |
| 184 | virtual gfx::Size DeviceViewportSize() const OVERRIDE; |
| 185 | virtual const LayerTreeSettings& Settings() const OVERRIDE; |
| 186 | public: |
| 187 | virtual void DidLoseOutputSurface() OVERRIDE; |
| 188 | virtual void OnSwapBuffersComplete() OVERRIDE; |
| 189 | virtual void SetFullRootLayerDamage() OVERRIDE; |
| 190 | virtual void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy) |
| 191 | OVERRIDE; |
| 192 | virtual void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) |
| 193 | OVERRIDE; |
| 194 | virtual bool HasImplThread() const OVERRIDE; |
| 195 | virtual bool ShouldClearRootRenderPass() const OVERRIDE; |
| 196 | virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const OVERRIDE; |
[email protected] | 7367359 | 2013-04-03 22:14:32 | [diff] [blame] | 197 | virtual bool AllowPartialSwap() const OVERRIDE; |
[email protected] | 8947cbe | 2012-11-28 05:27:43 | [diff] [blame] | 198 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 199 | // TileManagerClient implementation. |
| 200 | virtual void ScheduleManageTiles() OVERRIDE; |
[email protected] | 8612679 | 2013-03-16 20:07:54 | [diff] [blame] | 201 | virtual void DidInitializeVisibleTile() OVERRIDE; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 202 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 203 | // OutputSurfaceClient implementation. |
[email protected] | 1cd9f555 | 2013-04-26 04:22:03 | [diff] [blame] | 204 | virtual void SetNeedsRedrawRect(gfx::Rect rect) OVERRIDE; |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 205 | virtual void OnVSyncParametersChanged(base::TimeTicks timebase, |
| 206 | base::TimeDelta interval) OVERRIDE; |
[email protected] | 7ed4751 | 2013-03-26 22:28:45 | [diff] [blame] | 207 | virtual void DidVSync(base::TimeTicks frame_time) OVERRIDE; |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 208 | virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck& ack) |
| 209 | OVERRIDE; |
[email protected] | 3b31c6ac | 2012-12-06 21:27:29 | [diff] [blame] | 210 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 211 | // Called from LayerTreeImpl. |
| 212 | void OnCanDrawStateChangedForTree(); |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 213 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 214 | // Implementation |
| 215 | bool CanDraw(); |
| 216 | OutputSurface* output_surface() const { return output_surface_.get(); } |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 217 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 218 | std::string LayerTreeAsText() const; |
| 219 | std::string LayerTreeAsJson() const; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 220 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 221 | void FinishAllRendering(); |
| 222 | int SourceAnimationFrameNumber() const; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 223 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 224 | virtual bool InitializeRenderer(scoped_ptr<OutputSurface> output_surface); |
| 225 | bool IsContextLost(); |
| 226 | TileManager* tile_manager() { return tile_manager_.get(); } |
| 227 | Renderer* renderer() { return renderer_.get(); } |
| 228 | const RendererCapabilities& GetRendererCapabilities() const; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 229 | |
[email protected] | e034135 | 2013-04-06 05:01:20 | [diff] [blame] | 230 | virtual bool SwapBuffers(const FrameData& frame); |
[email protected] | 7ed4751 | 2013-03-26 22:28:45 | [diff] [blame] | 231 | void EnableVSyncNotification(bool enable); |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 232 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 233 | void Readback(void* pixels, gfx::Rect rect_in_device_viewport); |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 234 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 235 | LayerTreeImpl* active_tree() { return active_tree_.get(); } |
| 236 | const LayerTreeImpl* active_tree() const { return active_tree_.get(); } |
| 237 | LayerTreeImpl* pending_tree() { return pending_tree_.get(); } |
| 238 | const LayerTreeImpl* pending_tree() const { return pending_tree_.get(); } |
| 239 | const LayerTreeImpl* recycle_tree() const { return recycle_tree_.get(); } |
| 240 | void CreatePendingTree(); |
| 241 | void CheckForCompletedTileUploads(); |
| 242 | virtual bool ActivatePendingTreeIfNeeded(); |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 243 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 244 | // Shortcuts to layers on the active tree. |
| 245 | LayerImpl* RootLayer() const; |
| 246 | LayerImpl* RootScrollLayer() const; |
| 247 | LayerImpl* CurrentlyScrollingLayer() const; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 248 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 249 | virtual void SetVisible(bool visible); |
| 250 | bool visible() const { return visible_; } |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 251 | |
[email protected] | d7eb8c7 | 2013-03-23 22:57:13 | [diff] [blame] | 252 | void SetNeedsCommit() { client_->SetNeedsCommitOnImplThread(); } |
[email protected] | 59adb11 | 2013-04-09 04:48:44 | [diff] [blame] | 253 | void SetNeedsRedraw() { client_->SetNeedsRedrawOnImplThread(); } |
[email protected] | d7eb8c7 | 2013-03-23 22:57:13 | [diff] [blame] | 254 | |
[email protected] | 206a392 | 2013-05-17 06:34:12 | [diff] [blame] | 255 | ManagedMemoryPolicy ActualManagedMemoryPolicy() const; |
| 256 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 257 | size_t memory_allocation_limit_bytes() const { |
[email protected] | 46b8acc | 2013-03-19 22:38:35 | [diff] [blame] | 258 | return managed_memory_policy_.bytes_limit_when_visible; |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 259 | } |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 260 | |
[email protected] | 18ce5970 | 2013-04-09 04:58:40 | [diff] [blame] | 261 | void SetViewportSize(gfx::Size device_viewport_size); |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 262 | gfx::Size device_viewport_size() const { return device_viewport_size_; } |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 263 | |
[email protected] | d908376 | 2013-03-24 01:36:40 | [diff] [blame] | 264 | void SetOverdrawBottomHeight(float overdraw_bottom_height); |
| 265 | float overdraw_bottom_height() const { return overdraw_bottom_height_; } |
| 266 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 267 | void SetDeviceScaleFactor(float device_scale_factor); |
| 268 | float device_scale_factor() const { return device_scale_factor_; } |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 269 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 270 | scoped_ptr<ScrollAndScaleSet> ProcessScrollDeltas(); |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 271 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 272 | bool needs_animate_layers() const { |
| 273 | return !animation_registrar_->active_animation_controllers().empty(); |
| 274 | } |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 275 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 276 | void SendManagedMemoryStats( |
| 277 | size_t memory_visible_bytes, |
| 278 | size_t memory_visible_and_nearby_bytes, |
[email protected] | ed511b8d | 2013-03-25 03:29:29 | [diff] [blame] | 279 | size_t memory_use_bytes); |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 280 | |
[email protected] | d7626ffd | 2013-03-29 00:17:42 | [diff] [blame] | 281 | void set_max_memory_needed_bytes(size_t bytes) { |
| 282 | max_memory_needed_bytes_ = bytes; |
| 283 | } |
| 284 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 285 | FrameRateCounter* fps_counter() { |
| 286 | return fps_counter_.get(); |
| 287 | } |
| 288 | PaintTimeCounter* paint_time_counter() { |
| 289 | return paint_time_counter_.get(); |
| 290 | } |
| 291 | MemoryHistory* memory_history() { |
| 292 | return memory_history_.get(); |
| 293 | } |
| 294 | DebugRectHistory* debug_rect_history() { |
| 295 | return debug_rect_history_.get(); |
| 296 | } |
| 297 | ResourceProvider* resource_provider() { |
| 298 | return resource_provider_.get(); |
| 299 | } |
| 300 | TopControlsManager* top_controls_manager() { |
| 301 | return top_controls_manager_.get(); |
| 302 | } |
[email protected] | ff762fb | 2012-12-12 19:18:37 | [diff] [blame] | 303 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 304 | Proxy* proxy() const { return proxy_; } |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 305 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 306 | AnimationRegistrar* animation_registrar() const { |
| 307 | return animation_registrar_.get(); |
| 308 | } |
[email protected] | de4afb5e | 2012-12-20 00:11:34 | [diff] [blame] | 309 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 310 | void SetDebugState(const LayerTreeDebugState& debug_state); |
| 311 | const LayerTreeDebugState& debug_state() const { return debug_state_; } |
[email protected] | f511afb | 2012-11-30 01:55:20 | [diff] [blame] | 312 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 313 | class CC_EXPORT CullRenderPassesWithCachedTextures { |
| 314 | public: |
| 315 | bool ShouldRemoveRenderPass(const RenderPassDrawQuad& quad, |
| 316 | const FrameData& frame) const; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 317 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 318 | // Iterates from the root first, in order to remove the surfaces closest |
| 319 | // to the root with cached textures, and all surfaces that draw into |
| 320 | // them. |
| 321 | size_t RenderPassListBegin(const RenderPassList& list) const { |
| 322 | return list.size() - 1; |
| 323 | } |
| 324 | size_t RenderPassListEnd(const RenderPassList& list) const { return 0 - 1; } |
| 325 | size_t RenderPassListNext(size_t it) const { return it - 1; } |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 326 | |
[email protected] | bf691c2 | 2013-03-26 21:15:06 | [diff] [blame] | 327 | explicit CullRenderPassesWithCachedTextures(Renderer* renderer) |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 328 | : renderer_(renderer) {} |
| 329 | private: |
[email protected] | bf691c2 | 2013-03-26 21:15:06 | [diff] [blame] | 330 | Renderer* renderer_; |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 331 | }; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 332 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 333 | class CC_EXPORT CullRenderPassesWithNoQuads { |
| 334 | public: |
| 335 | bool ShouldRemoveRenderPass(const RenderPassDrawQuad& quad, |
| 336 | const FrameData& frame) const; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 337 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 338 | // Iterates in draw order, so that when a surface is removed, and its |
| 339 | // target becomes empty, then its target can be removed also. |
| 340 | size_t RenderPassListBegin(const RenderPassList& list) const { return 0; } |
| 341 | size_t RenderPassListEnd(const RenderPassList& list) const { |
| 342 | return list.size(); |
| 343 | } |
| 344 | size_t RenderPassListNext(size_t it) const { return it + 1; } |
| 345 | }; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 346 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 347 | template <typename RenderPassCuller> |
| 348 | static void RemoveRenderPasses(RenderPassCuller culler, FrameData* frame); |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 349 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 350 | skia::RefPtr<SkPicture> CapturePicture(); |
[email protected] | b9dcf43a | 2013-01-09 00:15:29 | [diff] [blame] | 351 | |
[email protected] | a2b5ded | 2013-05-20 21:32:53 | [diff] [blame^] | 352 | gfx::Vector2dF accumulated_root_overscroll() const { |
| 353 | return accumulated_root_overscroll_; |
| 354 | } |
| 355 | gfx::Vector2dF current_fling_velocity() const { |
| 356 | return current_fling_velocity_; |
| 357 | } |
| 358 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 359 | bool pinch_gesture_active() const { return pinch_gesture_active_; } |
[email protected] | 166db5c8 | 2013-01-09 23:54:31 | [diff] [blame] | 360 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 361 | void SetTreePriority(TreePriority priority); |
[email protected] | 362f1e8b | 2013-01-21 16:54:30 | [diff] [blame] | 362 | |
[email protected] | 8347d69 | 2013-05-17 23:22:38 | [diff] [blame] | 363 | void ResetCurrentFrameTimeForNextFrame(); |
[email protected] | fb7425a | 2013-04-22 16:28:55 | [diff] [blame] | 364 | base::TimeTicks CurrentFrameTimeTicks(); |
| 365 | base::Time CurrentFrameTime(); |
[email protected] | 829ad97 | 2013-01-28 23:36:10 | [diff] [blame] | 366 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 367 | scoped_ptr<base::Value> AsValue() const; |
| 368 | scoped_ptr<base::Value> ActivationStateAsValue() const; |
[email protected] | 131a0c2 | 2013-02-12 18:31:08 | [diff] [blame] | 369 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 370 | bool page_scale_animation_active() const { return !!page_scale_animation_; } |
[email protected] | 498ddd0 | 2013-02-28 23:59:25 | [diff] [blame] | 371 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 372 | protected: |
[email protected] | 372bad5f | 2013-03-21 16:38:43 | [diff] [blame] | 373 | LayerTreeHostImpl( |
| 374 | const LayerTreeSettings& settings, |
| 375 | LayerTreeHostImplClient* client, |
| 376 | Proxy* proxy, |
| 377 | RenderingStatsInstrumentation* rendering_stats_instrumentation); |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 378 | void ActivatePendingTree(); |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 379 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 380 | // Virtual for testing. |
| 381 | virtual void AnimateLayers(base::TimeTicks monotonic_time, |
| 382 | base::Time wall_clock_time); |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 383 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 384 | // Virtual for testing. |
| 385 | virtual base::TimeDelta LowFrequencyAnimationInterval() const; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 386 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 387 | const AnimationRegistrar::AnimationControllerMap& |
| 388 | active_animation_controllers() const { |
| 389 | return animation_registrar_->active_animation_controllers(); |
| 390 | } |
[email protected] | de4afb5e | 2012-12-20 00:11:34 | [diff] [blame] | 391 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 392 | LayerTreeHostImplClient* client_; |
| 393 | Proxy* proxy_; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 394 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 395 | private: |
| 396 | void AnimatePageScale(base::TimeTicks monotonic_time); |
| 397 | void AnimateScrollbars(base::TimeTicks monotonic_time); |
[email protected] | ffb2720f | 2013-03-15 19:18:37 | [diff] [blame] | 398 | void AnimateTopControls(base::TimeTicks monotonic_time); |
[email protected] | 2d69299 | 2012-12-19 01:19:32 | [diff] [blame] | 399 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 400 | gfx::Vector2dF ScrollLayerWithViewportSpaceDelta( |
[email protected] | ed511b8d | 2013-03-25 03:29:29 | [diff] [blame] | 401 | LayerImpl* layer_impl, |
| 402 | float scale_from_viewport_to_screen_space, |
| 403 | gfx::PointF viewport_point, |
| 404 | gfx::Vector2dF viewport_delta); |
[email protected] | 615c78a | 2013-01-24 23:44:16 | [diff] [blame] | 405 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 406 | void UpdateMaxScrollOffset(); |
[email protected] | 50761e9 | 2013-03-29 20:51:28 | [diff] [blame] | 407 | void TrackDamageForAllSurfaces( |
| 408 | LayerImpl* root_draw_layer, |
| 409 | const LayerImplList& render_surface_layer_list); |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 410 | |
[email protected] | 8be1a9bf | 2013-05-01 03:45:19 | [diff] [blame] | 411 | void UpdateTileManagerMemoryPolicy(const ManagedMemoryPolicy& policy); |
| 412 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 413 | // Returns false if the frame should not be displayed. This function should |
[email protected] | ed511b8d | 2013-03-25 03:29:29 | [diff] [blame] | 414 | // only be called from PrepareToDraw, as DidDrawAllLayers must be called |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 415 | // if this helper function is called. |
| 416 | bool CalculateRenderPasses(FrameData* frame); |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 417 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 418 | void SendDidLoseOutputSurfaceRecursive(LayerImpl* current); |
| 419 | void ClearRenderSurfaces(); |
| 420 | bool EnsureRenderSurfaceLayerList(); |
| 421 | void ClearCurrentlyScrollingLayer(); |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 422 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 423 | void AnimateScrollbarsRecursive(LayerImpl* layer, |
| 424 | base::TimeTicks time); |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 425 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 426 | void DumpRenderSurfaces(std::string* str, |
| 427 | int indent, |
| 428 | const LayerImpl* layer) const; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 429 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 430 | static LayerImpl* GetNonCompositedContentLayerRecursive(LayerImpl* layer); |
[email protected] | b9dcf43a | 2013-01-09 00:15:29 | [diff] [blame] | 431 | |
[email protected] | 0fc818e | 2013-03-18 06:45:20 | [diff] [blame] | 432 | void StartScrollbarAnimationRecursive(LayerImpl* layer, base::TimeTicks time); |
| 433 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 434 | scoped_ptr<OutputSurface> output_surface_; |
| 435 | scoped_ptr<ResourceProvider> resource_provider_; |
| 436 | scoped_ptr<Renderer> renderer_; |
| 437 | scoped_ptr<TileManager> tile_manager_; |
[email protected] | 3b31c6ac | 2012-12-06 21:27:29 | [diff] [blame] | 438 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 439 | // Tree currently being drawn. |
| 440 | scoped_ptr<LayerTreeImpl> active_tree_; |
[email protected] | 3b31c6ac | 2012-12-06 21:27:29 | [diff] [blame] | 441 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 442 | // In impl-side painting mode, tree with possibly incomplete rasterized |
| 443 | // content. May be promoted to active by ActivatePendingTreeIfNeeded(). |
| 444 | scoped_ptr<LayerTreeImpl> pending_tree_; |
[email protected] | 48871fc | 2013-01-23 07:36:51 | [diff] [blame] | 445 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 446 | // In impl-side painting mode, inert tree with layers that can be recycled |
| 447 | // by the next sync from the main thread. |
| 448 | scoped_ptr<LayerTreeImpl> recycle_tree_; |
[email protected] | 48871fc | 2013-01-23 07:36:51 | [diff] [blame] | 449 | |
[email protected] | 200a9c06 | 2013-05-20 04:34:37 | [diff] [blame] | 450 | InputHandlerClient* input_handler_client_; |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 451 | bool did_lock_scrolling_layer_; |
| 452 | bool should_bubble_scrolls_; |
| 453 | bool wheel_scrolling_; |
[email protected] | 1960a71 | 2013-04-30 17:06:47 | [diff] [blame] | 454 | // The optional delegate for the root layer scroll offset. |
| 455 | LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 456 | LayerTreeSettings settings_; |
| 457 | LayerTreeDebugState debug_state_; |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 458 | gfx::Size device_viewport_size_; |
[email protected] | d908376 | 2013-03-24 01:36:40 | [diff] [blame] | 459 | float overdraw_bottom_height_; |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 460 | float device_scale_factor_; |
| 461 | bool visible_; |
| 462 | ManagedMemoryPolicy managed_memory_policy_; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 463 | |
[email protected] | a2b5ded | 2013-05-20 21:32:53 | [diff] [blame^] | 464 | gfx::Vector2dF accumulated_root_overscroll_; |
[email protected] | 6e921bd | 2013-04-29 21:10:20 | [diff] [blame] | 465 | gfx::Vector2dF current_fling_velocity_; |
| 466 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 467 | bool pinch_gesture_active_; |
| 468 | gfx::Point previous_pinch_anchor_; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 469 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 470 | // This is set by AnimateLayers() and used by UpdateAnimationState() |
| 471 | // when sending animation events to the main thread. |
| 472 | base::Time last_animation_time_; |
[email protected] | 6ad55bb2 | 2013-02-08 21:34:33 | [diff] [blame] | 473 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 474 | scoped_ptr<TopControlsManager> top_controls_manager_; |
[email protected] | 3ba4cae | 2013-01-16 03:58:38 | [diff] [blame] | 475 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 476 | scoped_ptr<PageScaleAnimation> page_scale_animation_; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 477 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 478 | // This is used for ticking animations slowly when hidden. |
| 479 | scoped_ptr<LayerTreeHostImplTimeSourceAdapter> time_source_client_adapter_; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 480 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 481 | scoped_ptr<FrameRateCounter> fps_counter_; |
| 482 | scoped_ptr<PaintTimeCounter> paint_time_counter_; |
| 483 | scoped_ptr<MemoryHistory> memory_history_; |
| 484 | scoped_ptr<DebugRectHistory> debug_rect_history_; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 485 | |
[email protected] | d7626ffd | 2013-03-29 00:17:42 | [diff] [blame] | 486 | // The maximum memory that would be used by the prioritized resource |
| 487 | // manager, if there were no limit on memory usage. |
| 488 | size_t max_memory_needed_bytes_; |
| 489 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 490 | size_t last_sent_memory_visible_bytes_; |
| 491 | size_t last_sent_memory_visible_and_nearby_bytes_; |
| 492 | size_t last_sent_memory_use_bytes_; |
[email protected] | d3afa11 | 2012-12-08 06:24:28 | [diff] [blame] | 493 | |
[email protected] | 878705be | 2013-04-15 22:44:02 | [diff] [blame] | 494 | gfx::Rect viewport_damage_rect_; |
[email protected] | e034135 | 2013-04-06 05:01:20 | [diff] [blame] | 495 | |
[email protected] | fb7425a | 2013-04-22 16:28:55 | [diff] [blame] | 496 | base::TimeTicks current_frame_timeticks_; |
| 497 | base::Time current_frame_time_; |
[email protected] | 829ad97 | 2013-01-28 23:36:10 | [diff] [blame] | 498 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 499 | scoped_ptr<AnimationRegistrar> animation_registrar_; |
[email protected] | de4afb5e | 2012-12-20 00:11:34 | [diff] [blame] | 500 | |
[email protected] | 372bad5f | 2013-03-21 16:38:43 | [diff] [blame] | 501 | RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
| 502 | |
[email protected] | c1bb5af | 2013-03-13 19:06:27 | [diff] [blame] | 503 | DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 504 | }; |
| 505 | |
[email protected] | 0023e8b | 2012-10-15 12:52:45 | [diff] [blame] | 506 | } // namespace cc |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 507 | |
[email protected] | 556fd29 | 2013-03-18 08:03:04 | [diff] [blame] | 508 | #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |