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

Side by Side Diff: cc/layers/video_layer_impl.cc

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « cc/layers/texture_layer_impl.cc ('k') | cc/output/direct_renderer.cc » ('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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/layers/video_layer_impl.h" 5 #include "cc/layers/video_layer_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "cc/layers/video_frame_provider_client_impl.h" 9 #include "cc/layers/video_frame_provider_client_impl.h"
10 #include "cc/quads/io_surface_draw_quad.h" 10 #include "cc/quads/io_surface_draw_quad.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 SK_ColorTRANSPARENT, 215 SK_ColorTRANSPARENT,
216 opacity, 216 opacity,
217 flipped, 217 flipped,
218 nearest_neighbor); 218 nearest_neighbor);
219 break; 219 break;
220 } 220 }
221 case VideoFrameExternalResources::YUV_RESOURCE: { 221 case VideoFrameExternalResources::YUV_RESOURCE: {
222 DCHECK_GE(frame_resources_.size(), 3u); 222 DCHECK_GE(frame_resources_.size(), 3u);
223 if (frame_resources_.size() < 3u) 223 if (frame_resources_.size() < 3u)
224 break; 224 break;
225 YUVVideoDrawQuad::ColorSpace color_space = YUVVideoDrawQuad::REC_601; 225 YUVVideoDrawQuad::ColorSpace color_space =
226 if (frame_->format() == media::VideoFrame::YV12J) { 226 frame_->format() == media::VideoFrame::YV12J
227 color_space = YUVVideoDrawQuad::JPEG; 227 ? YUVVideoDrawQuad::REC_601_JPEG
228 } else if (frame_->format() == media::VideoFrame::YV12HD) { 228 : YUVVideoDrawQuad::REC_601;
229 color_space = YUVVideoDrawQuad::REC_709;
230 }
231
232 gfx::RectF tex_coord_rect( 229 gfx::RectF tex_coord_rect(
233 tex_x_offset, tex_y_offset, tex_width_scale, tex_height_scale); 230 tex_x_offset, tex_y_offset, tex_width_scale, tex_height_scale);
234 YUVVideoDrawQuad* yuv_video_quad = 231 YUVVideoDrawQuad* yuv_video_quad =
235 render_pass->CreateAndAppendDrawQuad<YUVVideoDrawQuad>(); 232 render_pass->CreateAndAppendDrawQuad<YUVVideoDrawQuad>();
236 yuv_video_quad->SetNew( 233 yuv_video_quad->SetNew(
237 shared_quad_state, quad_rect, opaque_rect, visible_quad_rect, 234 shared_quad_state, quad_rect, opaque_rect, visible_quad_rect,
238 tex_coord_rect, coded_size, frame_resources_[0], frame_resources_[1], 235 tex_coord_rect, coded_size, frame_resources_[0], frame_resources_[1],
239 frame_resources_[2], 236 frame_resources_[2],
240 frame_resources_.size() > 3 ? frame_resources_[3] : 0, color_space); 237 frame_resources_.size() > 3 ? frame_resources_[3] : 0, color_space);
241 break; 238 break;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 void VideoLayerImpl::SetProviderClientImpl( 364 void VideoLayerImpl::SetProviderClientImpl(
368 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl) { 365 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl) {
369 provider_client_impl_ = provider_client_impl; 366 provider_client_impl_ = provider_client_impl;
370 } 367 }
371 368
372 const char* VideoLayerImpl::LayerTypeAsString() const { 369 const char* VideoLayerImpl::LayerTypeAsString() const {
373 return "cc::VideoLayerImpl"; 370 return "cc::VideoLayerImpl";
374 } 371 }
375 372
376 } // namespace cc 373 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/texture_layer_impl.cc ('k') | cc/output/direct_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698