| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 transform.Rotate(270.0); | 163 transform.Rotate(270.0); |
| 164 transform.Translate(-rotated_size.width(), 0); | 164 transform.Translate(-rotated_size.width(), 0); |
| 165 case media::VIDEO_ROTATION_0: | 165 case media::VIDEO_ROTATION_0: |
| 166 break; | 166 break; |
| 167 } | 167 } |
| 168 | 168 |
| 169 SharedQuadState* shared_quad_state = | 169 SharedQuadState* shared_quad_state = |
| 170 render_pass->CreateAndAppendSharedQuadState(); | 170 render_pass->CreateAndAppendSharedQuadState(); |
| 171 shared_quad_state->SetAll(transform, rotated_size, visible_layer_rect(), | 171 shared_quad_state->SetAll(transform, rotated_size, visible_layer_rect(), |
| 172 clip_rect(), is_clipped(), draw_opacity(), | 172 clip_rect(), is_clipped(), draw_opacity(), |
| 173 draw_blend_mode(), sorting_context_id()); | 173 draw_blend_mode(), GetSortingContextId()); |
| 174 | 174 |
| 175 AppendDebugBorderQuad( | 175 AppendDebugBorderQuad( |
| 176 render_pass, rotated_size, shared_quad_state, append_quads_data); | 176 render_pass, rotated_size, shared_quad_state, append_quads_data); |
| 177 | 177 |
| 178 gfx::Rect quad_rect(rotated_size); | 178 gfx::Rect quad_rect(rotated_size); |
| 179 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); | 179 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); |
| 180 gfx::Rect visible_rect = frame_->visible_rect(); | 180 gfx::Rect visible_rect = frame_->visible_rect(); |
| 181 gfx::Size coded_size = frame_->coded_size(); | 181 gfx::Size coded_size = frame_->coded_size(); |
| 182 | 182 |
| 183 Occlusion occlusion_in_video_space = | 183 Occlusion occlusion_in_video_space = |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 void VideoLayerImpl::SetNeedsRedraw() { | 372 void VideoLayerImpl::SetNeedsRedraw() { |
| 373 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds()))); | 373 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds()))); |
| 374 layer_tree_impl()->SetNeedsRedraw(); | 374 layer_tree_impl()->SetNeedsRedraw(); |
| 375 } | 375 } |
| 376 | 376 |
| 377 const char* VideoLayerImpl::LayerTypeAsString() const { | 377 const char* VideoLayerImpl::LayerTypeAsString() const { |
| 378 return "cc::VideoLayerImpl"; | 378 return "cc::VideoLayerImpl"; |
| 379 } | 379 } |
| 380 | 380 |
| 381 } // namespace cc | 381 } // namespace cc |
| OLD | NEW |