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

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

Issue 178133005: Audit/fix use of media::VideoFrame::coded_size() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: e6f9affb danakj@ comments. 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
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/quad_sink.h" 9 #include "cc/layers/quad_sink.h"
10 #include "cc/layers/video_frame_provider_client_impl.h" 10 #include "cc/layers/video_frame_provider_client_impl.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 frame_resources_[0], 225 frame_resources_[0],
226 scale * provider_client_impl_->stream_texture_matrix()); 226 scale * provider_client_impl_->stream_texture_matrix());
227 quad_sink->Append(stream_video_quad.PassAs<DrawQuad>(), 227 quad_sink->Append(stream_video_quad.PassAs<DrawQuad>(),
228 append_quads_data); 228 append_quads_data);
229 break; 229 break;
230 } 230 }
231 case VideoFrameExternalResources::IO_SURFACE: { 231 case VideoFrameExternalResources::IO_SURFACE: {
232 DCHECK_EQ(frame_resources_.size(), 1u); 232 DCHECK_EQ(frame_resources_.size(), 1u);
233 if (frame_resources_.size() < 1u) 233 if (frame_resources_.size() < 1u)
234 break; 234 break;
235 gfx::Size visible_size(visible_rect.width(), visible_rect.height());
236 scoped_ptr<IOSurfaceDrawQuad> io_surface_quad = 235 scoped_ptr<IOSurfaceDrawQuad> io_surface_quad =
237 IOSurfaceDrawQuad::Create(); 236 IOSurfaceDrawQuad::Create();
238 io_surface_quad->SetNew(shared_quad_state, 237 io_surface_quad->SetNew(shared_quad_state,
239 quad_rect, 238 quad_rect,
240 opaque_rect, 239 opaque_rect,
241 visible_size, 240 visible_rect.size(),
242 frame_resources_[0], 241 frame_resources_[0],
243 IOSurfaceDrawQuad::UNFLIPPED); 242 IOSurfaceDrawQuad::UNFLIPPED);
244 quad_sink->Append(io_surface_quad.PassAs<DrawQuad>(), 243 quad_sink->Append(io_surface_quad.PassAs<DrawQuad>(),
245 append_quads_data); 244 append_quads_data);
246 break; 245 break;
247 } 246 }
248 #if defined(VIDEO_HOLE) 247 #if defined(VIDEO_HOLE)
249 // This block and other blocks wrapped around #if defined(GOOGLE_TV) is not 248 // This block and other blocks wrapped around #if defined(GOOGLE_TV) is not
250 // maintained by the general compositor team. Please contact the following 249 // maintained by the general compositor team. Please contact the following
251 // people instead: 250 // people instead:
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 void VideoLayerImpl::SetProviderClientImpl( 308 void VideoLayerImpl::SetProviderClientImpl(
310 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl) { 309 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl) {
311 provider_client_impl_ = provider_client_impl; 310 provider_client_impl_ = provider_client_impl;
312 } 311 }
313 312
314 const char* VideoLayerImpl::LayerTypeAsString() const { 313 const char* VideoLayerImpl::LayerTypeAsString() const {
315 return "cc::VideoLayerImpl"; 314 return "cc::VideoLayerImpl";
316 } 315 }
317 316
318 } // namespace cc 317 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/resources/video_resource_updater.cc » ('j') | cc/resources/video_resource_updater.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698