blob: 9d3a3357c3c5e2724850315cbbd633a6a40e340f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "config.h"
#include "cc/stream_video_draw_quad.h"
#include "base/logging.h"
namespace cc {
scoped_ptr<StreamVideoDrawQuad> StreamVideoDrawQuad::create(const SharedQuadState* sharedQuadState, const gfx::Rect& quadRect, unsigned textureId, const WebKit::WebTransformationMatrix& matrix)
{
return make_scoped_ptr(new StreamVideoDrawQuad(sharedQuadState, quadRect, textureId, matrix));
}
StreamVideoDrawQuad::StreamVideoDrawQuad(const SharedQuadState* sharedQuadState, const gfx::Rect& quadRect, unsigned textureId, const WebKit::WebTransformationMatrix& matrix)
: DrawQuad(sharedQuadState, DrawQuad::StreamVideoContent, quadRect)
, m_textureId(textureId)
, m_matrix(matrix)
{
}
const StreamVideoDrawQuad* StreamVideoDrawQuad::materialCast(const DrawQuad* quad)
{
DCHECK(quad->material() == DrawQuad::StreamVideoContent);
return static_cast<const StreamVideoDrawQuad*>(quad);
}
} // namespace cc
|