Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: cc/trees/layer_tree_host_impl.h

Issue 619843002: cc: Make separate interface for BeginFrame ipc from OutputSurface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_
6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_
7 7
8 #include <list> 8 #include <list>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 13 matching lines...) Expand all
24 #include "cc/input/top_controls_manager_client.h" 24 #include "cc/input/top_controls_manager_client.h"
25 #include "cc/layers/layer_lists.h" 25 #include "cc/layers/layer_lists.h"
26 #include "cc/layers/render_pass_sink.h" 26 #include "cc/layers/render_pass_sink.h"
27 #include "cc/output/begin_frame_args.h" 27 #include "cc/output/begin_frame_args.h"
28 #include "cc/output/managed_memory_policy.h" 28 #include "cc/output/managed_memory_policy.h"
29 #include "cc/output/output_surface_client.h" 29 #include "cc/output/output_surface_client.h"
30 #include "cc/output/renderer.h" 30 #include "cc/output/renderer.h"
31 #include "cc/quads/render_pass.h" 31 #include "cc/quads/render_pass.h"
32 #include "cc/resources/resource_provider.h" 32 #include "cc/resources/resource_provider.h"
33 #include "cc/resources/tile_manager.h" 33 #include "cc/resources/tile_manager.h"
34 #include "cc/scheduler/begin_frame_source.h"
35 #include "cc/scheduler/draw_result.h" 34 #include "cc/scheduler/draw_result.h"
36 #include "skia/ext/refptr.h" 35 #include "skia/ext/refptr.h"
37 #include "third_party/skia/include/core/SkColor.h" 36 #include "third_party/skia/include/core/SkColor.h"
38 #include "ui/gfx/geometry/rect.h" 37 #include "ui/gfx/geometry/rect.h"
39 38
40 namespace cc { 39 namespace cc {
41 40
42 class CompletionEvent; 41 class CompletionEvent;
43 class CompositorFrameMetadata; 42 class CompositorFrameMetadata;
44 class DebugRectHistory; 43 class DebugRectHistory;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 103
105 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering 104 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering
106 // state. 105 // state.
107 class CC_EXPORT LayerTreeHostImpl 106 class CC_EXPORT LayerTreeHostImpl
108 : public InputHandler, 107 : public InputHandler,
109 public RendererClient, 108 public RendererClient,
110 public TileManagerClient, 109 public TileManagerClient,
111 public OutputSurfaceClient, 110 public OutputSurfaceClient,
112 public TopControlsManagerClient, 111 public TopControlsManagerClient,
113 public ScrollbarAnimationControllerClient, 112 public ScrollbarAnimationControllerClient,
114 public BeginFrameSourceMixIn,
115 public base::SupportsWeakPtr<LayerTreeHostImpl> { 113 public base::SupportsWeakPtr<LayerTreeHostImpl> {
116 public: 114 public:
117 static scoped_ptr<LayerTreeHostImpl> Create( 115 static scoped_ptr<LayerTreeHostImpl> Create(
118 const LayerTreeSettings& settings, 116 const LayerTreeSettings& settings,
119 LayerTreeHostImplClient* client, 117 LayerTreeHostImplClient* client,
120 Proxy* proxy, 118 Proxy* proxy,
121 RenderingStatsInstrumentation* rendering_stats_instrumentation, 119 RenderingStatsInstrumentation* rendering_stats_instrumentation,
122 SharedBitmapManager* shared_bitmap_manager, 120 SharedBitmapManager* shared_bitmap_manager,
123 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 121 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
124 int id); 122 int id);
125 ~LayerTreeHostImpl() override; 123 ~LayerTreeHostImpl() override;
126 124
127 // BeginFrameSourceMixIn implementation
128 void OnNeedsBeginFramesChange(bool needs_begin_frames) override;
129
130 // InputHandler implementation 125 // InputHandler implementation
131 void BindToClient(InputHandlerClient* client) override; 126 void BindToClient(InputHandlerClient* client) override;
132 InputHandler::ScrollStatus ScrollBegin( 127 InputHandler::ScrollStatus ScrollBegin(
133 const gfx::Point& viewport_point, 128 const gfx::Point& viewport_point,
134 InputHandler::ScrollInputType type) override; 129 InputHandler::ScrollInputType type) override;
135 InputHandler::ScrollStatus ScrollAnimated( 130 InputHandler::ScrollStatus ScrollAnimated(
136 const gfx::Point& viewport_point, 131 const gfx::Point& viewport_point,
137 const gfx::Vector2dF& scroll_delta) override; 132 const gfx::Vector2dF& scroll_delta) override;
138 InputHandlerScrollResult ScrollBy( 133 InputHandlerScrollResult ScrollBy(
139 const gfx::Point& viewport_point, 134 const gfx::Point& viewport_point,
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 void PostDelayedScrollbarFade(const base::Closure& start_fade, 238 void PostDelayedScrollbarFade(const base::Closure& start_fade,
244 base::TimeDelta delay) override; 239 base::TimeDelta delay) override;
245 void SetNeedsScrollbarAnimationFrame() override; 240 void SetNeedsScrollbarAnimationFrame() override;
246 241
247 // OutputSurfaceClient implementation. 242 // OutputSurfaceClient implementation.
248 void DeferredInitialize() override; 243 void DeferredInitialize() override;
249 void ReleaseGL() override; 244 void ReleaseGL() override;
250 void CommitVSyncParameters(base::TimeTicks timebase, 245 void CommitVSyncParameters(base::TimeTicks timebase,
251 base::TimeDelta interval) override; 246 base::TimeDelta interval) override;
252 void SetNeedsRedrawRect(const gfx::Rect& rect) override; 247 void SetNeedsRedrawRect(const gfx::Rect& rect) override;
253 void BeginFrame(const BeginFrameArgs& args) override;
254
255 void SetExternalDrawConstraints( 248 void SetExternalDrawConstraints(
256 const gfx::Transform& transform, 249 const gfx::Transform& transform,
257 const gfx::Rect& viewport, 250 const gfx::Rect& viewport,
258 const gfx::Rect& clip, 251 const gfx::Rect& clip,
259 const gfx::Rect& viewport_rect_for_tile_priority, 252 const gfx::Rect& viewport_rect_for_tile_priority,
260 const gfx::Transform& transform_for_tile_priority, 253 const gfx::Transform& transform_for_tile_priority,
261 bool resourceless_software_draw) override; 254 bool resourceless_software_draw) override;
262 void DidLoseOutputSurface() override; 255 void DidLoseOutputSurface() override;
263 void DidSwapBuffers() override; 256 void DidSwapBuffers() override;
264 void DidSwapBuffersComplete() override; 257 void DidSwapBuffersComplete() override;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 411
419 void UpdateCurrentBeginFrameArgs(const BeginFrameArgs& args); 412 void UpdateCurrentBeginFrameArgs(const BeginFrameArgs& args);
420 void ResetCurrentBeginFrameArgsForNextFrame(); 413 void ResetCurrentBeginFrameArgsForNextFrame();
421 virtual BeginFrameArgs CurrentBeginFrameArgs() const; 414 virtual BeginFrameArgs CurrentBeginFrameArgs() const;
422 415
423 // Expected time between two begin impl frame calls. 416 // Expected time between two begin impl frame calls.
424 base::TimeDelta begin_impl_frame_interval() const { 417 base::TimeDelta begin_impl_frame_interval() const {
425 return begin_impl_frame_interval_; 418 return begin_impl_frame_interval_;
426 } 419 }
427 420
428 void AsValueInto(base::debug::TracedValue* value) const override; 421 void AsValueInto(base::debug::TracedValue* value) const;
429 void AsValueWithFrameInto(FrameData* frame, 422 void AsValueWithFrameInto(FrameData* frame,
430 base::debug::TracedValue* value) const; 423 base::debug::TracedValue* value) const;
431 scoped_refptr<base::debug::ConvertableToTraceFormat> AsValue() const; 424 scoped_refptr<base::debug::ConvertableToTraceFormat> AsValue() const;
432 scoped_refptr<base::debug::ConvertableToTraceFormat> AsValueWithFrame( 425 scoped_refptr<base::debug::ConvertableToTraceFormat> AsValueWithFrame(
433 FrameData* frame) const; 426 FrameData* frame) const;
434 scoped_refptr<base::debug::ConvertableToTraceFormat> ActivationStateAsValue() 427 scoped_refptr<base::debug::ConvertableToTraceFormat> ActivationStateAsValue()
435 const; 428 const;
436 void ActivationStateAsValueInto(base::debug::TracedValue* value) const; 429 void ActivationStateAsValueInto(base::debug::TracedValue* value) const;
437 430
438 bool page_scale_animation_active() const { return !!page_scale_animation_; } 431 bool page_scale_animation_active() const { return !!page_scale_animation_; }
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; 706 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_;
714 707
715 bool requires_high_res_to_draw_; 708 bool requires_high_res_to_draw_;
716 709
717 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 710 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
718 }; 711 };
719 712
720 } // namespace cc 713 } // namespace cc
721 714
722 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 715 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698