Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2179)

Unified Diff: cc/video_frame_draw_quad.cc

Issue 11274017: Added support for YUV videos to the software compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More cosmetics. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« cc/video_frame_draw_quad.h ('K') | « cc/video_frame_draw_quad.h ('k') | cc/video_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698