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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 rotated_size = gfx::Size(rotated_size.height(), rotated_size.width()); | 155 rotated_size = gfx::Size(rotated_size.height(), rotated_size.width()); |
156 transform.Rotate(270.0); | 156 transform.Rotate(270.0); |
157 transform.Translate(-rotated_size.width(), 0); | 157 transform.Translate(-rotated_size.width(), 0); |
158 case media::VIDEO_ROTATION_0: | 158 case media::VIDEO_ROTATION_0: |
159 break; | 159 break; |
160 } | 160 } |
161 | 161 |
162 SharedQuadState* shared_quad_state = | 162 SharedQuadState* shared_quad_state = |
163 render_pass->CreateAndAppendSharedQuadState(); | 163 render_pass->CreateAndAppendSharedQuadState(); |
164 shared_quad_state->SetAll(transform, rotated_size, visible_layer_rect(), | 164 shared_quad_state->SetAll(transform, rotated_size, visible_layer_rect(), |
165 clip_rect(), is_clipped(), draw_opacity(), | 165 clip_rect(), is_clipped_from_property_tree(), |
166 draw_blend_mode(), sorting_context_id()); | 166 draw_opacity(), draw_blend_mode(), |
| 167 sorting_context_id()); |
167 | 168 |
168 AppendDebugBorderQuad( | 169 AppendDebugBorderQuad( |
169 render_pass, rotated_size, shared_quad_state, append_quads_data); | 170 render_pass, rotated_size, shared_quad_state, append_quads_data); |
170 | 171 |
171 gfx::Rect quad_rect(rotated_size); | 172 gfx::Rect quad_rect(rotated_size); |
172 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); | 173 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); |
173 gfx::Rect visible_rect = frame_->visible_rect(); | 174 gfx::Rect visible_rect = frame_->visible_rect(); |
174 gfx::Size coded_size = frame_->coded_size(); | 175 gfx::Size coded_size = frame_->coded_size(); |
175 | 176 |
176 Occlusion occlusion_in_video_space = | 177 Occlusion occlusion_in_video_space = |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 void VideoLayerImpl::SetNeedsRedraw() { | 404 void VideoLayerImpl::SetNeedsRedraw() { |
404 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds()))); | 405 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds()))); |
405 layer_tree_impl()->SetNeedsRedraw(); | 406 layer_tree_impl()->SetNeedsRedraw(); |
406 } | 407 } |
407 | 408 |
408 const char* VideoLayerImpl::LayerTypeAsString() const { | 409 const char* VideoLayerImpl::LayerTypeAsString() const { |
409 return "cc::VideoLayerImpl"; | 410 return "cc::VideoLayerImpl"; |
410 } | 411 } |
411 | 412 |
412 } // namespace cc | 413 } // namespace cc |
OLD | NEW |