| 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;
|
|
|