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

Side by Side Diff: cc/yuv_video_draw_quad.cc

Issue 12340124: cc: Receive and remap resources to the parent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
« cc/draw_quad.h ('K') | « cc/yuv_video_draw_quad.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/yuv_video_draw_quad.h" 5 #include "cc/yuv_video_draw_quad.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 this->v_plane = v_plane; 49 this->v_plane = v_plane;
50 } 50 }
51 51
52 void YUVVideoDrawQuad::AppendResources( 52 void YUVVideoDrawQuad::AppendResources(
53 ResourceProvider::ResourceIdArray* resources) { 53 ResourceProvider::ResourceIdArray* resources) {
54 resources->push_back(y_plane.resourceId); 54 resources->push_back(y_plane.resourceId);
55 resources->push_back(u_plane.resourceId); 55 resources->push_back(u_plane.resourceId);
56 resources->push_back(v_plane.resourceId); 56 resources->push_back(v_plane.resourceId);
57 } 57 }
58 58
59 void YUVVideoDrawQuad::RemapResources(
60 const ResourceRemapCallback& remap_callback) {
61 y_plane.resourceId = remap_callback.Run(y_plane.resourceId);
62 u_plane.resourceId = remap_callback.Run(u_plane.resourceId);
63 v_plane.resourceId = remap_callback.Run(v_plane.resourceId);
64 }
65
59 const YUVVideoDrawQuad* YUVVideoDrawQuad::MaterialCast( 66 const YUVVideoDrawQuad* YUVVideoDrawQuad::MaterialCast(
60 const DrawQuad* quad) { 67 const DrawQuad* quad) {
61 DCHECK(quad->material == DrawQuad::YUV_VIDEO_CONTENT); 68 DCHECK(quad->material == DrawQuad::YUV_VIDEO_CONTENT);
62 return static_cast<const YUVVideoDrawQuad*>(quad); 69 return static_cast<const YUVVideoDrawQuad*>(quad);
63 } 70 }
64 71
65 } // namespace cc 72 } // namespace cc
OLDNEW
« cc/draw_quad.h ('K') | « cc/yuv_video_draw_quad.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698