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

Side by Side Diff: cc/layers/quad_sink.h

Issue 304203005: Remove const LayerImpl* from QuadSink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@onlyQuadSink
Patch Set: Created 6 years, 6 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_LAYERS_QUAD_SINK_H_ 5 #ifndef CC_LAYERS_QUAD_SINK_H_
6 #define CC_LAYERS_QUAD_SINK_H_ 6 #define CC_LAYERS_QUAD_SINK_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/base/cc_export.h" 9 #include "cc/base/cc_export.h"
10 10
11 namespace gfx { 11 namespace gfx {
12 class Rect; 12 class Rect;
13 class Transform; 13 class Transform;
14 } 14 }
15 15
16 namespace cc { 16 namespace cc {
17 17
18 class DrawQuad; 18 class DrawQuad;
19 class LayerImpl; 19 class LayerImpl;
20 class RenderPass; 20 class RenderPass;
21 class RenderSurfaceImpl; 21 class RenderSurfaceImpl;
22 class SharedQuadState; 22 class SharedQuadState;
23 template <typename LayerType> 23 template <typename LayerType>
24 class OcclusionTracker; 24 class OcclusionTracker;
25 25
26 class CC_EXPORT QuadSink { 26 class CC_EXPORT QuadSink {
27 public: 27 public:
28 QuadSink(RenderPass* render_pass, 28 QuadSink(RenderPass* render_pass,
29 const LayerImpl* layer,
30 const OcclusionTracker<LayerImpl>* occlusion_tracker); 29 const OcclusionTracker<LayerImpl>* occlusion_tracker);
31 ~QuadSink() {} 30 ~QuadSink() {}
32 31
33 // Call this to add a SharedQuadState before appending quads that refer to it. 32 // Call this to add a SharedQuadState before appending quads that refer to it.
34 // Returns a pointer to the given SharedQuadState, that can be set on the 33 // Returns a pointer to the given SharedQuadState, that can be set on the
35 // quads to append. 34 // quads to append.
36 virtual SharedQuadState* CreateSharedQuadState(); 35 virtual SharedQuadState* CreateSharedQuadState();
37 36
38 virtual gfx::Rect UnoccludedContentRect(const gfx::Rect& content_rect, 37 virtual gfx::Rect UnoccludedContentRect(const LayerImpl* layer,
38 const gfx::Rect& content_rect,
39 const gfx::Transform& draw_transform); 39 const gfx::Transform& draw_transform);
40 40
41 virtual gfx::Rect UnoccludedContributingSurfaceContentRect( 41 virtual gfx::Rect UnoccludedContributingSurfaceContentRect(
42 const LayerImpl* layer,
42 const gfx::Rect& content_rect, 43 const gfx::Rect& content_rect,
43 const gfx::Transform& draw_transform); 44 const gfx::Transform& draw_transform);
44 45
45 virtual void Append(scoped_ptr<DrawQuad> draw_quad); 46 virtual void Append(scoped_ptr<DrawQuad> draw_quad);
46 47
47 protected: 48 protected:
48 RenderPass* render_pass_; 49 RenderPass* render_pass_;
49 const LayerImpl* layer_;
50 50
51 SharedQuadState* current_shared_quad_state_; 51 SharedQuadState* current_shared_quad_state_;
52 52
53 private: 53 private:
54 const OcclusionTracker<LayerImpl>* occlusion_tracker_; 54 const OcclusionTracker<LayerImpl>* occlusion_tracker_;
55 55
56 DISALLOW_COPY_AND_ASSIGN(QuadSink); 56 DISALLOW_COPY_AND_ASSIGN(QuadSink);
57 }; 57 };
58 58
59 } // namespace cc 59 } // namespace cc
60 60
61 #endif // CC_LAYERS_QUAD_SINK_H_ 61 #endif // CC_LAYERS_QUAD_SINK_H_
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/layers/quad_sink.cc » ('j') | cc/layers/quad_sink.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698