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

Side by Side Diff: cc/draw_quad.h

Issue 11412044: cc: Remove opaque flags from SharedQuadState and DrawQuad (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « cc/delegated_renderer_layer_impl_unittest.cc ('k') | cc/draw_quad.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_DRAW_QUAD_H_ 5 #ifndef CC_DRAW_QUAD_H_
6 #define CC_DRAW_QUAD_H_ 6 #define CC_DRAW_QUAD_H_
7 7
8 #include "cc/cc_export.h" 8 #include "cc/cc_export.h"
9 #include "cc/shared_quad_state.h" 9 #include "cc/shared_quad_state.h"
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 Material material() const { return m_material; } 47 Material material() const { return m_material; }
48 48
49 scoped_ptr<DrawQuad> copy(const SharedQuadState* copiedSharedQuadState) cons t; 49 scoped_ptr<DrawQuad> copy(const SharedQuadState* copiedSharedQuadState) cons t;
50 50
51 const SharedQuadState* sharedQuadState() const { return m_sharedQuadState; } 51 const SharedQuadState* sharedQuadState() const { return m_sharedQuadState; }
52 int sharedQuadStateId() const { return m_sharedQuadStateId; } 52 int sharedQuadStateId() const { return m_sharedQuadStateId; }
53 void setSharedQuadState(const SharedQuadState*); 53 void setSharedQuadState(const SharedQuadState*);
54 54
55 protected: 55 protected:
56 DrawQuad(const SharedQuadState*, Material, const gfx::Rect&); 56 DrawQuad(const SharedQuadState*, Material, const gfx::Rect&, const gfx::Rect & opaqueRect);
57 57
58 // Stores state common to a large bundle of quads; kept separate for memory 58 // Stores state common to a large bundle of quads; kept separate for memory
59 // efficiency. There is special treatment to reconstruct these pointers 59 // efficiency. There is special treatment to reconstruct these pointers
60 // during serialization. 60 // during serialization.
61 const SharedQuadState* m_sharedQuadState; 61 const SharedQuadState* m_sharedQuadState;
62 int m_sharedQuadStateId; 62 int m_sharedQuadStateId;
63 63
64 Material m_material; 64 Material m_material;
65 gfx::Rect m_quadRect; 65 gfx::Rect m_quadRect;
66 gfx::Rect m_quadVisibleRect; 66 gfx::Rect m_quadVisibleRect;
67 67
68 // By default, the shared quad state determines whether or not this quad is 68 // By default blending is used when some part of the quad is not opaque. Wit h
69 // opaque or needs blending. Derived classes can override with these 69 // this setting, it is possible to force blending on regardless of the opaqu e
70 // variables. 70 // area.
71 bool m_quadOpaque;
72 bool m_needsBlending; 71 bool m_needsBlending;
73 72
74 // Be default, this rect is empty. It is used when the shared quad state and above 73 // Be default, this rect is empty. It is used when the shared quad state and above
75 // variables determine that the quad is not fully opaque but may be partiall y opaque. 74 // variables determine that the quad is not fully opaque but may be partiall y opaque.
76 gfx::Rect m_opaqueRect; 75 gfx::Rect m_opaqueRect;
77 }; 76 };
78 77
79 } 78 }
80 79
81 #endif // CC_DRAW_QUAD_H_ 80 #endif // CC_DRAW_QUAD_H_
OLDNEW
« no previous file with comments | « cc/delegated_renderer_layer_impl_unittest.cc ('k') | cc/draw_quad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698