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

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

Issue 304203005: Remove const LayerImpl* from QuadSink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@onlyQuadSink
Patch Set: Created 6 years, 6 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
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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 PopulateSharedQuadState(shared_quad_state); 132 PopulateSharedQuadState(shared_quad_state);
133 133
134 AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data); 134 AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data);
135 135
136 gfx::Rect quad_rect(content_bounds()); 136 gfx::Rect quad_rect(content_bounds());
137 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); 137 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect());
138 gfx::Rect visible_rect = frame_->visible_rect(); 138 gfx::Rect visible_rect = frame_->visible_rect();
139 gfx::Size coded_size = frame_->coded_size(); 139 gfx::Size coded_size = frame_->coded_size();
140 140
141 gfx::Rect visible_quad_rect = quad_sink->UnoccludedContentRect( 141 gfx::Rect visible_quad_rect = quad_sink->UnoccludedContentRect(
142 quad_rect, draw_properties().target_space_transform); 142 this, quad_rect, draw_properties().target_space_transform);
143 if (visible_quad_rect.IsEmpty()) 143 if (visible_quad_rect.IsEmpty())
144 return; 144 return;
145 145
146 // Pixels for macroblocked formats. 146 // Pixels for macroblocked formats.
147 const float tex_width_scale = 147 const float tex_width_scale =
148 static_cast<float>(visible_rect.width()) / coded_size.width(); 148 static_cast<float>(visible_rect.width()) / coded_size.width();
149 const float tex_height_scale = 149 const float tex_height_scale =
150 static_cast<float>(visible_rect.height()) / coded_size.height(); 150 static_cast<float>(visible_rect.height()) / coded_size.height();
151 const float tex_x_offset = 151 const float tex_x_offset =
152 static_cast<float>(visible_rect.x()) / coded_size.width(); 152 static_cast<float>(visible_rect.x()) / coded_size.width();
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 void VideoLayerImpl::SetProviderClientImpl( 331 void VideoLayerImpl::SetProviderClientImpl(
332 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl) { 332 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl) {
333 provider_client_impl_ = provider_client_impl; 333 provider_client_impl_ = provider_client_impl;
334 } 334 }
335 335
336 const char* VideoLayerImpl::LayerTypeAsString() const { 336 const char* VideoLayerImpl::LayerTypeAsString() const {
337 return "cc::VideoLayerImpl"; 337 return "cc::VideoLayerImpl";
338 } 338 }
339 339
340 } // namespace cc 340 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698