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
3 // found in the LICENSE file.
7 #include "CCStreamVideoDrawQuad.h"
11 PassOwnPtr
<CCStreamVideoDrawQuad
> CCStreamVideoDrawQuad::create(const CCSharedQuadState
* sharedQuadState
, const IntRect
& quadRect
, unsigned textureId
, const WebKit::WebTransformationMatrix
& matrix
)
13 return adoptPtr(new CCStreamVideoDrawQuad(sharedQuadState
, quadRect
, textureId
, matrix
));
16 CCStreamVideoDrawQuad::CCStreamVideoDrawQuad(const CCSharedQuadState
* sharedQuadState
, const IntRect
& quadRect
, unsigned textureId
, const WebKit::WebTransformationMatrix
& matrix
)
17 : CCDrawQuad(sharedQuadState
, CCDrawQuad::StreamVideoContent
, quadRect
)
18 , m_textureId(textureId
)
23 const CCStreamVideoDrawQuad
* CCStreamVideoDrawQuad::materialCast(const CCDrawQuad
* quad
)
25 ASSERT(quad
->material() == CCDrawQuad::StreamVideoContent
);
26 return static_cast<const CCStreamVideoDrawQuad
*>(quad
);