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

Side by Side Diff: cc/draw_quad.h

Issue 11344050: Fix DrawQuad copy (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 | « no previous file | 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 CCDrawQuad_h 5 #ifndef CCDrawQuad_h
6 #define CCDrawQuad_h 6 #define CCDrawQuad_h
7 7
8 #include "cc/shared_quad_state.h" 8 #include "cc/shared_quad_state.h"
9 9
10 namespace cc { 10 namespace cc {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 bool needsBlending() const { return m_needsBlending || !opaqueRect().Contain s(m_quadVisibleRect); } 48 bool needsBlending() const { return m_needsBlending || !opaqueRect().Contain s(m_quadVisibleRect); }
49 49
50 // Allows changing the rect that gets drawn to make it smaller. Parameter pa ssed 50 // Allows changing the rect that gets drawn to make it smaller. Parameter pa ssed
51 // in will be clipped to quadRect(). 51 // in will be clipped to quadRect().
52 void setQuadVisibleRect(gfx::Rect); 52 void setQuadVisibleRect(gfx::Rect);
53 gfx::Rect quadVisibleRect() const { return m_quadVisibleRect; } 53 gfx::Rect quadVisibleRect() const { return m_quadVisibleRect; }
54 bool isDebugQuad() const { return m_material == DebugBorder; } 54 bool isDebugQuad() const { return m_material == DebugBorder; }
55 55
56 Material material() const { return m_material; } 56 Material material() const { return m_material; }
57 57
58 // Returns transfer size of this object based on the derived class (by
59 // looking at the material type).
60 unsigned size() const;
aelias_OOO_until_Jul13 2012/10/31 02:50:02 I don't think we want to delete this. The InputEv
61
62 scoped_ptr<DrawQuad> copy(const SharedQuadState* copiedSharedQuadState) cons t; 58 scoped_ptr<DrawQuad> copy(const SharedQuadState* copiedSharedQuadState) cons t;
63 59
64 const SharedQuadState* sharedQuadState() const { return m_sharedQuadState; } 60 const SharedQuadState* sharedQuadState() const { return m_sharedQuadState; }
65 int sharedQuadStateId() const { return m_sharedQuadStateId; } 61 int sharedQuadStateId() const { return m_sharedQuadStateId; }
66 void setSharedQuadState(const SharedQuadState*); 62 void setSharedQuadState(const SharedQuadState*);
67 63
68 protected: 64 protected:
69 DrawQuad(const SharedQuadState*, Material, const gfx::Rect&); 65 DrawQuad(const SharedQuadState*, Material, const gfx::Rect&);
70 66
71 // Stores state common to a large bundle of quads; kept separate for memory 67 // Stores state common to a large bundle of quads; kept separate for memory
(...skipping 15 matching lines...) Expand all
87 // Be default, this rect is empty. It is used when the shared quad state and above 83 // Be default, this rect is empty. It is used when the shared quad state and above
88 // variables determine that the quad is not fully opaque but may be partiall y opaque. 84 // variables determine that the quad is not fully opaque but may be partiall y opaque.
89 gfx::Rect m_opaqueRect; 85 gfx::Rect m_opaqueRect;
90 }; 86 };
91 87
92 #pragma pack(pop) 88 #pragma pack(pop)
93 89
94 } 90 }
95 91
96 #endif 92 #endif
OLDNEW
« no previous file with comments | « no previous file | cc/draw_quad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698