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/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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 case media::VIDEO_ROTATION_270: | 152 case media::VIDEO_ROTATION_270: |
153 rotated_size = gfx::Size(rotated_size.height(), rotated_size.width()); | 153 rotated_size = gfx::Size(rotated_size.height(), rotated_size.width()); |
154 transform.Rotate(270.0); | 154 transform.Rotate(270.0); |
155 transform.Translate(-rotated_size.width(), 0); | 155 transform.Translate(-rotated_size.width(), 0); |
156 case media::VIDEO_ROTATION_0: | 156 case media::VIDEO_ROTATION_0: |
157 break; | 157 break; |
158 } | 158 } |
159 | 159 |
160 SharedQuadState* shared_quad_state = | 160 SharedQuadState* shared_quad_state = |
161 render_pass->CreateAndAppendSharedQuadState(); | 161 render_pass->CreateAndAppendSharedQuadState(); |
162 shared_quad_state->SetAll(transform, | 162 shared_quad_state->SetAll(transform, rotated_size, visible_content_rect(), |
163 rotated_size, | 163 clip_rect(), is_clipped(), draw_opacity(), |
164 visible_content_rect(), | 164 draw_blend_mode(), sorting_context_id()); |
165 clip_rect(), | |
166 is_clipped(), | |
167 draw_opacity(), | |
168 blend_mode(), | |
169 sorting_context_id()); | |
170 | 165 |
171 AppendDebugBorderQuad( | 166 AppendDebugBorderQuad( |
172 render_pass, rotated_size, shared_quad_state, append_quads_data); | 167 render_pass, rotated_size, shared_quad_state, append_quads_data); |
173 | 168 |
174 gfx::Rect quad_rect(rotated_size); | 169 gfx::Rect quad_rect(rotated_size); |
175 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); | 170 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); |
176 gfx::Rect visible_rect = frame_->visible_rect(); | 171 gfx::Rect visible_rect = frame_->visible_rect(); |
177 gfx::Size coded_size = frame_->coded_size(); | 172 gfx::Size coded_size = frame_->coded_size(); |
178 | 173 |
179 Occlusion occlusion_in_video_space = | 174 Occlusion occlusion_in_video_space = |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 void VideoLayerImpl::SetProviderClientImpl( | 365 void VideoLayerImpl::SetProviderClientImpl( |
371 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl) { | 366 scoped_refptr<VideoFrameProviderClientImpl> provider_client_impl) { |
372 provider_client_impl_ = provider_client_impl; | 367 provider_client_impl_ = provider_client_impl; |
373 } | 368 } |
374 | 369 |
375 const char* VideoLayerImpl::LayerTypeAsString() const { | 370 const char* VideoLayerImpl::LayerTypeAsString() const { |
376 return "cc::VideoLayerImpl"; | 371 return "cc::VideoLayerImpl"; |
377 } | 372 } |
378 | 373 |
379 } // namespace cc | 374 } // namespace cc |
OLD | NEW |