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

Unified Diff: cc/CCDrawQuad.cpp

Issue 10917153: Update cc snapshot to r127918 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/CCDrawQuad.h ('k') | cc/CCGestureCurve.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCDrawQuad.cpp
diff --git a/cc/CCDrawQuad.cpp b/cc/CCDrawQuad.cpp
index ad14b840b691a714c59dcdc32dc862bc82ac2e41..4006698946a90f258f498cd392e44794e1640f11 100644
--- a/cc/CCDrawQuad.cpp
+++ b/cc/CCDrawQuad.cpp
@@ -76,6 +76,21 @@ unsigned CCDrawQuad::size() const
return sizeof(CCDrawQuad);
}
+PassOwnPtr<CCDrawQuad> CCDrawQuad::copy(const CCSharedQuadState* copiedSharedQuadState) const
+{
+ // RenderPass quads have their own copy() method.
+ ASSERT(material() != RenderPass);
+
+ unsigned bytes = size();
+ ASSERT(bytes);
+
+ OwnPtr<CCDrawQuad> copyQuad(adoptPtr(reinterpret_cast<CCDrawQuad*>(new char[bytes])));
+ memcpy(copyQuad.get(), this, bytes);
+ copyQuad->setSharedQuadState(copiedSharedQuadState);
+
+ return copyQuad.release();
+}
+
void CCDrawQuad::setSharedQuadState(const CCSharedQuadState* sharedQuadState)
{
m_sharedQuadState = sharedQuadState;
« no previous file with comments | « cc/CCDrawQuad.h ('k') | cc/CCGestureCurve.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698