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

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

Issue 309493002: Remove QuadCuller class and make QuadSink concrete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@test2ownMock
Patch Set: gn build fix 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
« no previous file with comments | « cc/cc.gyp ('k') | cc/layers/quad_sink.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 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;
21 class RenderSurfaceImpl;
20 class SharedQuadState; 22 class SharedQuadState;
23 template <typename LayerType>
24 class OcclusionTracker;
21 25
22 class CC_EXPORT QuadSink { 26 class CC_EXPORT QuadSink {
23 public: 27 public:
24 virtual ~QuadSink() {} 28 QuadSink(RenderPass* render_pass,
29 const OcclusionTracker<LayerImpl>* occlusion_tracker);
30 ~QuadSink() {}
25 31
26 // 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.
27 // 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
28 // quads to append. 34 // quads to append.
29 virtual SharedQuadState* CreateSharedQuadState() = 0; 35 virtual SharedQuadState* CreateSharedQuadState();
30 36
31 virtual gfx::Rect UnoccludedContentRect( 37 virtual gfx::Rect UnoccludedContentRect(const gfx::Rect& content_rect,
32 const gfx::Rect& content_rect, 38 const gfx::Transform& draw_transform);
33 const gfx::Transform& draw_transform) = 0;
34 39
35 virtual gfx::Rect UnoccludedContributingSurfaceContentRect( 40 virtual gfx::Rect UnoccludedContributingSurfaceContentRect(
36 const gfx::Rect& content_rect, 41 const gfx::Rect& content_rect,
37 const gfx::Transform& draw_transform) = 0; 42 const gfx::Transform& draw_transform);
38 43
39 virtual void Append(scoped_ptr<DrawQuad> draw_quad) = 0; 44 virtual void Append(scoped_ptr<DrawQuad> draw_quad);
45
46 protected:
47 RenderPass* render_pass_;
48
49 SharedQuadState* current_shared_quad_state_;
50
51 private:
52 const OcclusionTracker<LayerImpl>* occlusion_tracker_;
53
54 DISALLOW_COPY_AND_ASSIGN(QuadSink);
40 }; 55 };
41 56
42 } // namespace cc 57 } // namespace cc
43 58
44 #endif // CC_LAYERS_QUAD_SINK_H_ 59 #endif // CC_LAYERS_QUAD_SINK_H_
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/layers/quad_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698