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

Side by Side Diff: cc/draw_quad.cc

Issue 12157002: Adding YUVA support for enabling Alpha Playback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moving VP8 Alpha Playback behind its own flag Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/draw_quad.h" 5 #include "cc/draw_quad.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "cc/checkerboard_draw_quad.h" 8 #include "cc/checkerboard_draw_quad.h"
9 #include "cc/debug_border_draw_quad.h" 9 #include "cc/debug_border_draw_quad.h"
10 #include "cc/io_surface_draw_quad.h" 10 #include "cc/io_surface_draw_quad.h"
11 #include "cc/render_pass_draw_quad.h" 11 #include "cc/render_pass_draw_quad.h"
12 #include "cc/solid_color_draw_quad.h" 12 #include "cc/solid_color_draw_quad.h"
13 #include "cc/stream_video_draw_quad.h" 13 #include "cc/stream_video_draw_quad.h"
14 #include "cc/texture_draw_quad.h" 14 #include "cc/texture_draw_quad.h"
15 #include "cc/tile_draw_quad.h" 15 #include "cc/tile_draw_quad.h"
16 #include "cc/yuv_video_draw_quad.h" 16 #include "cc/yuv_video_draw_quad.h"
17 #include "cc/yuva_video_draw_quad.h"
17 18
18 namespace { 19 namespace {
19 20
20 template<typename T> T* TypedCopy(const cc::DrawQuad* other) { 21 template<typename T> T* TypedCopy(const cc::DrawQuad* other) {
21 return new T(*T::MaterialCast(other)); 22 return new T(*T::MaterialCast(other));
22 } 23 }
23 24
24 } 25 }
25 26
26 namespace cc { 27 namespace cc {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 break; 74 break;
74 case TILED_CONTENT: 75 case TILED_CONTENT:
75 copy_quad.reset(TypedCopy<TileDrawQuad>(this)); 76 copy_quad.reset(TypedCopy<TileDrawQuad>(this));
76 break; 77 break;
77 case STREAM_VIDEO_CONTENT: 78 case STREAM_VIDEO_CONTENT:
78 copy_quad.reset(TypedCopy<StreamVideoDrawQuad>(this)); 79 copy_quad.reset(TypedCopy<StreamVideoDrawQuad>(this));
79 break; 80 break;
80 case YUV_VIDEO_CONTENT: 81 case YUV_VIDEO_CONTENT:
81 copy_quad.reset(TypedCopy<YUVVideoDrawQuad>(this)); 82 copy_quad.reset(TypedCopy<YUVVideoDrawQuad>(this));
82 break; 83 break;
84 case YUVA_VIDEO_CONTENT:
85 copy_quad.reset(TypedCopy<YUVAVideoDrawQuad>(this));
86 break;
83 case RENDER_PASS: // RenderPass quads have their own copy() method. 87 case RENDER_PASS: // RenderPass quads have their own copy() method.
84 case INVALID: 88 case INVALID:
85 LOG(FATAL) << "Invalid DrawQuad material " << material; 89 LOG(FATAL) << "Invalid DrawQuad material " << material;
86 break; 90 break;
87 } 91 }
88 copy_quad->shared_quad_state = copied_shared_quad_state; 92 copy_quad->shared_quad_state = copied_shared_quad_state;
89 return copy_quad.Pass(); 93 return copy_quad.Pass();
90 } 94 }
91 95
92 void DrawQuad::AppendResources(ResourceProvider::ResourceIdArray* resources) {} 96 void DrawQuad::AppendResources(ResourceProvider::ResourceIdArray* resources) {}
93 97
94 } // namespace cc 98 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698