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

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, 2 months 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
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/rect.h" 37 #include "ui/gfx/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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 104
106 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering 105 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering
107 // state. 106 // state.
108 class CC_EXPORT LayerTreeHostImpl 107 class CC_EXPORT LayerTreeHostImpl
109 : public InputHandler, 108 : public InputHandler,
110 public RendererClient, 109 public RendererClient,
111 public TileManagerClient, 110 public TileManagerClient,
112 public OutputSurfaceClient, 111 public OutputSurfaceClient,
113 public TopControlsManagerClient, 112 public TopControlsManagerClient,
114 public ScrollbarAnimationControllerClient, 113 public ScrollbarAnimationControllerClient,
115 public BeginFrameSourceMixIn,
116 public base::SupportsWeakPtr<LayerTreeHostImpl> { 114 public base::SupportsWeakPtr<LayerTreeHostImpl> {
117 public: 115 public:
118 static scoped_ptr<LayerTreeHostImpl> Create( 116 static scoped_ptr<LayerTreeHostImpl> Create(
119 const LayerTreeSettings& settings, 117 const LayerTreeSettings& settings,
120 LayerTreeHostImplClient* client, 118 LayerTreeHostImplClient* client,
121 Proxy* proxy, 119 Proxy* proxy,
122 RenderingStatsInstrumentation* rendering_stats_instrumentation, 120 RenderingStatsInstrumentation* rendering_stats_instrumentation,
123 SharedBitmapManager* manager, 121 SharedBitmapManager* manager,
124 int id); 122 int id);
125 virtual ~LayerTreeHostImpl(); 123 virtual ~LayerTreeHostImpl();
126 124
127 // BeginFrameSourceMixIn implementation
128 virtual void OnNeedsBeginFramesChange(bool needs_begin_frames) override;
129
130 // InputHandler implementation 125 // InputHandler implementation
131 virtual void BindToClient(InputHandlerClient* client) override; 126 virtual void BindToClient(InputHandlerClient* client) override;
132 virtual InputHandler::ScrollStatus ScrollBegin( 127 virtual 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 virtual InputHandler::ScrollStatus ScrollAnimated( 130 virtual 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 virtual bool ScrollBy(const gfx::Point& viewport_point, 133 virtual bool ScrollBy(const gfx::Point& viewport_point,
139 const gfx::Vector2dF& scroll_delta) override; 134 const gfx::Vector2dF& scroll_delta) override;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 virtual void PostDelayedScrollbarFade(const base::Closure& start_fade, 242 virtual void PostDelayedScrollbarFade(const base::Closure& start_fade,
248 base::TimeDelta delay) override; 243 base::TimeDelta delay) override;
249 virtual void SetNeedsScrollbarAnimationFrame() override; 244 virtual void SetNeedsScrollbarAnimationFrame() override;
250 245
251 // OutputSurfaceClient implementation. 246 // OutputSurfaceClient implementation.
252 virtual void DeferredInitialize() override; 247 virtual void DeferredInitialize() override;
253 virtual void ReleaseGL() override; 248 virtual void ReleaseGL() override;
254 virtual void CommitVSyncParameters(base::TimeTicks timebase, 249 virtual void CommitVSyncParameters(base::TimeTicks timebase,
255 base::TimeDelta interval) override; 250 base::TimeDelta interval) override;
256 virtual void SetNeedsRedrawRect(const gfx::Rect& rect) override; 251 virtual void SetNeedsRedrawRect(const gfx::Rect& rect) override;
257 virtual void BeginFrame(const BeginFrameArgs& args) override;
258 252
259 virtual void SetExternalDrawConstraints( 253 virtual void SetExternalDrawConstraints(
260 const gfx::Transform& transform, 254 const gfx::Transform& transform,
261 const gfx::Rect& viewport, 255 const gfx::Rect& viewport,
262 const gfx::Rect& clip, 256 const gfx::Rect& clip,
263 const gfx::Rect& viewport_rect_for_tile_priority, 257 const gfx::Rect& viewport_rect_for_tile_priority,
264 const gfx::Transform& transform_for_tile_priority, 258 const gfx::Transform& transform_for_tile_priority,
265 bool resourceless_software_draw) override; 259 bool resourceless_software_draw) override;
266 virtual void DidLoseOutputSurface() override; 260 virtual void DidLoseOutputSurface() override;
267 virtual void DidSwapBuffers() override; 261 virtual void DidSwapBuffers() override;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 415
422 void UpdateCurrentBeginFrameArgs(const BeginFrameArgs& args); 416 void UpdateCurrentBeginFrameArgs(const BeginFrameArgs& args);
423 void ResetCurrentBeginFrameArgsForNextFrame(); 417 void ResetCurrentBeginFrameArgsForNextFrame();
424 virtual BeginFrameArgs CurrentBeginFrameArgs() const; 418 virtual BeginFrameArgs CurrentBeginFrameArgs() const;
425 419
426 // Expected time between two begin impl frame calls. 420 // Expected time between two begin impl frame calls.
427 base::TimeDelta begin_impl_frame_interval() const { 421 base::TimeDelta begin_impl_frame_interval() const {
428 return begin_impl_frame_interval_; 422 return begin_impl_frame_interval_;
429 } 423 }
430 424
431 virtual void AsValueInto(base::debug::TracedValue* value) const override; 425 void AsValueInto(base::debug::TracedValue* value) const {
danakj 2014/10/10 16:03:35 keep the defn in the .cc
simonhong 2014/10/15 01:04:21 Done.
426 return AsValueWithFrameInto(NULL, value);
427 }
432 void AsValueWithFrameInto(FrameData* frame, 428 void AsValueWithFrameInto(FrameData* frame,
433 base::debug::TracedValue* value) const; 429 base::debug::TracedValue* value) const;
434 scoped_refptr<base::debug::ConvertableToTraceFormat> AsValue() const; 430 scoped_refptr<base::debug::ConvertableToTraceFormat> AsValue() const;
435 scoped_refptr<base::debug::ConvertableToTraceFormat> AsValueWithFrame( 431 scoped_refptr<base::debug::ConvertableToTraceFormat> AsValueWithFrame(
436 FrameData* frame) const; 432 FrameData* frame) const;
437 scoped_refptr<base::debug::ConvertableToTraceFormat> ActivationStateAsValue() 433 scoped_refptr<base::debug::ConvertableToTraceFormat> ActivationStateAsValue()
438 const; 434 const;
439 void ActivationStateAsValueInto(base::debug::TracedValue* value) const; 435 void ActivationStateAsValueInto(base::debug::TracedValue* value) const;
440 436
441 bool page_scale_animation_active() const { return !!page_scale_animation_; } 437 bool page_scale_animation_active() const { return !!page_scale_animation_; }
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; 705 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_;
710 706
711 bool requires_high_res_to_draw_; 707 bool requires_high_res_to_draw_;
712 708
713 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 709 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
714 }; 710 };
715 711
716 } // namespace cc 712 } // namespace cc
717 713
718 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 714 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698