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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/CCDrawQuad.h ('k') | cc/CCGestureCurve.h » ('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 #include "config.h" 5 #include "config.h"
6 #include "CCDrawQuad.h" 6 #include "CCDrawQuad.h"
7 7
8 #include "CCCheckerboardDrawQuad.h" 8 #include "CCCheckerboardDrawQuad.h"
9 #include "CCDebugBorderDrawQuad.h" 9 #include "CCDebugBorderDrawQuad.h"
10 #include "CCIOSurfaceDrawQuad.h" 10 #include "CCIOSurfaceDrawQuad.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 case YUVVideoContent: 69 case YUVVideoContent:
70 return sizeof(CCYUVVideoDrawQuad); 70 return sizeof(CCYUVVideoDrawQuad);
71 case Invalid: 71 case Invalid:
72 break; 72 break;
73 } 73 }
74 74
75 CRASH(); 75 CRASH();
76 return sizeof(CCDrawQuad); 76 return sizeof(CCDrawQuad);
77 } 77 }
78 78
79 PassOwnPtr<CCDrawQuad> CCDrawQuad::copy(const CCSharedQuadState* copiedSharedQua dState) const
80 {
81 // RenderPass quads have their own copy() method.
82 ASSERT(material() != RenderPass);
83
84 unsigned bytes = size();
85 ASSERT(bytes);
86
87 OwnPtr<CCDrawQuad> copyQuad(adoptPtr(reinterpret_cast<CCDrawQuad*>(new char[ bytes])));
88 memcpy(copyQuad.get(), this, bytes);
89 copyQuad->setSharedQuadState(copiedSharedQuadState);
90
91 return copyQuad.release();
92 }
93
79 void CCDrawQuad::setSharedQuadState(const CCSharedQuadState* sharedQuadState) 94 void CCDrawQuad::setSharedQuadState(const CCSharedQuadState* sharedQuadState)
80 { 95 {
81 m_sharedQuadState = sharedQuadState; 96 m_sharedQuadState = sharedQuadState;
82 m_sharedQuadStateId = sharedQuadState->id; 97 m_sharedQuadStateId = sharedQuadState->id;
83 } 98 }
84 99
85 } 100 }
OLDNEW
« 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