OLD | NEW |
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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 return true; | 124 return true; |
125 } | 125 } |
126 | 126 |
127 void VideoLayerImpl::AppendQuads(QuadSink* quad_sink, | 127 void VideoLayerImpl::AppendQuads(QuadSink* quad_sink, |
128 AppendQuadsData* append_quads_data) { | 128 AppendQuadsData* append_quads_data) { |
129 DCHECK(frame_.get()); | 129 DCHECK(frame_.get()); |
130 | 130 |
131 SharedQuadState* shared_quad_state = quad_sink->CreateSharedQuadState(); | 131 SharedQuadState* shared_quad_state = quad_sink->CreateSharedQuadState(); |
132 PopulateSharedQuadState(shared_quad_state); | 132 PopulateSharedQuadState(shared_quad_state); |
133 | 133 |
134 AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data); | 134 AppendDebugBorderQuad( |
| 135 quad_sink, content_bounds(), shared_quad_state, append_quads_data); |
135 | 136 |
136 gfx::Rect quad_rect(content_bounds()); | 137 gfx::Rect quad_rect(content_bounds()); |
137 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); | 138 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); |
138 gfx::Rect visible_rect = frame_->visible_rect(); | 139 gfx::Rect visible_rect = frame_->visible_rect(); |
139 gfx::Size coded_size = frame_->coded_size(); | 140 gfx::Size coded_size = frame_->coded_size(); |
140 | 141 |
141 gfx::Rect visible_quad_rect = quad_sink->UnoccludedContentRect( | 142 gfx::Rect visible_quad_rect = quad_sink->UnoccludedContentRect( |
142 quad_rect, draw_properties().target_space_transform); | 143 quad_rect, draw_properties().target_space_transform); |
143 if (visible_quad_rect.IsEmpty()) | 144 if (visible_quad_rect.IsEmpty()) |
144 return; | 145 return; |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 void VideoLayerImpl::SetProviderClientImpl( | 332 void VideoLayerImpl::SetProviderClientImpl( |
332 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl) { | 333 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl) { |
333 provider_client_impl_ = provider_client_impl; | 334 provider_client_impl_ = provider_client_impl; |
334 } | 335 } |
335 | 336 |
336 const char* VideoLayerImpl::LayerTypeAsString() const { | 337 const char* VideoLayerImpl::LayerTypeAsString() const { |
337 return "cc::VideoLayerImpl"; | 338 return "cc::VideoLayerImpl"; |
338 } | 339 } |
339 | 340 |
340 } // namespace cc | 341 } // namespace cc |
OLD | NEW |