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

Side by Side Diff: cc/resources/video_resource_updater.cc

Issue 207233002: cc: Support texcoord offsets in YUVVideoDrawQuad (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: c7cdf916 Rebase. Created 6 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
« no previous file with comments | « cc/quads/yuv_video_draw_quad.cc ('k') | cc/test/data/yuv_stripes.png » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/resources/video_resource_updater.h" 5 #include "cc/resources/video_resource_updater.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "cc/output/gl_renderer.h" 8 #include "cc/output/gl_renderer.h"
9 #include "cc/resources/resource_provider.h" 9 #include "cc/resources/resource_provider.h"
10 #include "gpu/GLES2/gl2extchromium.h" 10 #include "gpu/GLES2/gl2extchromium.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 return VideoFrameExternalResources(); 51 return VideoFrameExternalResources();
52 52
53 if (video_frame->format() == media::VideoFrame::NATIVE_TEXTURE) 53 if (video_frame->format() == media::VideoFrame::NATIVE_TEXTURE)
54 return CreateForHardwarePlanes(video_frame); 54 return CreateForHardwarePlanes(video_frame);
55 else 55 else
56 return CreateForSoftwarePlanes(video_frame); 56 return CreateForSoftwarePlanes(video_frame);
57 } 57 }
58 58
59 bool VideoResourceUpdater::VerifyFrame( 59 bool VideoResourceUpdater::VerifyFrame(
60 const scoped_refptr<media::VideoFrame>& video_frame) { 60 const scoped_refptr<media::VideoFrame>& video_frame) {
61 // If these fail, we'll have to add logic that handles offset bitmap/texture
62 // UVs. For now, just expect (0, 0) offset, since all our decoders so far
63 // don't offset.
64 DCHECK_EQ(video_frame->visible_rect().x(), 0);
65 DCHECK_EQ(video_frame->visible_rect().y(), 0);
66
67 switch (video_frame->format()) { 61 switch (video_frame->format()) {
68 // Acceptable inputs. 62 // Acceptable inputs.
69 case media::VideoFrame::YV12: 63 case media::VideoFrame::YV12:
70 case media::VideoFrame::YV12A: 64 case media::VideoFrame::YV12A:
71 case media::VideoFrame::YV16: 65 case media::VideoFrame::YV16:
72 case media::VideoFrame::YV12J: 66 case media::VideoFrame::YV12J:
73 case media::VideoFrame::NATIVE_TEXTURE: 67 case media::VideoFrame::NATIVE_TEXTURE:
74 #if defined(VIDEO_HOLE) 68 #if defined(VIDEO_HOLE)
75 case media::VideoFrame::HOLE: 69 case media::VideoFrame::HOLE:
76 #endif // defined(VIDEO_HOLE) 70 #endif // defined(VIDEO_HOLE)
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 } 352 }
359 353
360 PlaneResource recycled_resource(data.resource_id, 354 PlaneResource recycled_resource(data.resource_id,
361 data.resource_size, 355 data.resource_size,
362 data.resource_format, 356 data.resource_format,
363 data.mailbox); 357 data.mailbox);
364 updater->recycled_resources_.push_back(recycled_resource); 358 updater->recycled_resources_.push_back(recycled_resource);
365 } 359 }
366 360
367 } // namespace cc 361 } // namespace cc
OLDNEW
« no previous file with comments | « cc/quads/yuv_video_draw_quad.cc ('k') | cc/test/data/yuv_stripes.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698