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.
5 #include "cc/stream_video_draw_quad.h"
7 #include "base/logging.h"
11 scoped_ptr
<StreamVideoDrawQuad
> StreamVideoDrawQuad::create(const SharedQuadState
* sharedQuadState
, const gfx::Rect
& quadRect
, unsigned textureId
, const WebKit::WebTransformationMatrix
& matrix
)
13 return make_scoped_ptr(new StreamVideoDrawQuad(sharedQuadState
, quadRect
, textureId
, matrix
));
16 StreamVideoDrawQuad::StreamVideoDrawQuad(const SharedQuadState
* sharedQuadState
, const gfx::Rect
& quadRect
, unsigned textureId
, const WebKit::WebTransformationMatrix
& matrix
)
17 : DrawQuad(sharedQuadState
, DrawQuad::StreamVideoContent
, quadRect
)
18 , m_textureId(textureId
)
23 const StreamVideoDrawQuad
* StreamVideoDrawQuad::materialCast(const DrawQuad
* quad
)
25 DCHECK(quad
->material() == DrawQuad::StreamVideoContent
);
26 return static_cast<const StreamVideoDrawQuad
*>(quad
);