Index: cc/video_frame_draw_quad.cc |
diff --git a/cc/video_frame_draw_quad.cc b/cc/video_frame_draw_quad.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1eb48bdc1488a983845ed840f75e664e504f0ace |
--- /dev/null |
+++ b/cc/video_frame_draw_quad.cc |
@@ -0,0 +1,34 @@ |
+// 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/video_frame_draw_quad.h" |
+ |
+#include "base/logging.h" |
+#include "media/base/video_frame.h" |
+ |
+namespace cc { |
+ |
+scoped_ptr<VideoFrameDrawQuad> VideoFrameDrawQuad::create( |
+ const SharedQuadState* shared_quad_state, |
+ const gfx::Rect& quad_rect, |
+ media::VideoFrame* frame) { |
+ return make_scoped_ptr(new VideoFrameDrawQuad(shared_quad_state, quad_rect, frame)); |
+} |
+ |
+VideoFrameDrawQuad::VideoFrameDrawQuad( |
+ const SharedQuadState* shared_quad_state, |
+ const gfx::Rect& quad_rect, |
+ media::VideoFrame* frame) |
+ : DrawQuad(shared_quad_state, DrawQuad::VideoFrameContent, quad_rect) |
+ , frame_(frame) { |
+} |
+ |
+const VideoFrameDrawQuad* VideoFrameDrawQuad::materialCast(const DrawQuad* quad) { |
+ DCHECK(quad->material() == DrawQuad::VideoFrameContent); |
+ return static_cast<const VideoFrameDrawQuad*>(quad); |
+} |
+ |
+} // namespace cc |