| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 131         external_resources.mailboxes[i].is_overlay_candidate())); | 131         external_resources.mailboxes[i].is_overlay_candidate())); | 
| 132   } | 132   } | 
| 133 | 133 | 
| 134   return true; | 134   return true; | 
| 135 } | 135 } | 
| 136 | 136 | 
| 137 void VideoLayerImpl::AppendQuads(RenderPass* render_pass, | 137 void VideoLayerImpl::AppendQuads(RenderPass* render_pass, | 
| 138                                  AppendQuadsData* append_quads_data) { | 138                                  AppendQuadsData* append_quads_data) { | 
| 139   DCHECK(frame_.get()); | 139   DCHECK(frame_.get()); | 
| 140 | 140 | 
| 141   gfx::Transform transform = draw_transform(); | 141   gfx::Transform transform = DrawTransform(); | 
| 142   gfx::Size rotated_size = bounds(); | 142   gfx::Size rotated_size = bounds(); | 
| 143 | 143 | 
| 144   switch (video_rotation_) { | 144   switch (video_rotation_) { | 
| 145     case media::VIDEO_ROTATION_90: | 145     case media::VIDEO_ROTATION_90: | 
| 146       rotated_size = gfx::Size(rotated_size.height(), rotated_size.width()); | 146       rotated_size = gfx::Size(rotated_size.height(), rotated_size.width()); | 
| 147       transform.Rotate(90.0); | 147       transform.Rotate(90.0); | 
| 148       transform.Translate(0.0, -rotated_size.height()); | 148       transform.Translate(0.0, -rotated_size.height()); | 
| 149       break; | 149       break; | 
| 150     case media::VIDEO_ROTATION_180: | 150     case media::VIDEO_ROTATION_180: | 
| 151       transform.Rotate(180.0); | 151       transform.Rotate(180.0); | 
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 397 void VideoLayerImpl::SetNeedsRedraw() { | 397 void VideoLayerImpl::SetNeedsRedraw() { | 
| 398   SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds()))); | 398   SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds()))); | 
| 399   layer_tree_impl()->SetNeedsRedraw(); | 399   layer_tree_impl()->SetNeedsRedraw(); | 
| 400 } | 400 } | 
| 401 | 401 | 
| 402 const char* VideoLayerImpl::LayerTypeAsString() const { | 402 const char* VideoLayerImpl::LayerTypeAsString() const { | 
| 403   return "cc::VideoLayerImpl"; | 403   return "cc::VideoLayerImpl"; | 
| 404 } | 404 } | 
| 405 | 405 | 
| 406 }  // namespace cc | 406 }  // namespace cc | 
| OLD | NEW | 
|---|