| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/compositor/layer.h" | 5 #include "ui/compositor/layer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 unsigned Layer::PrepareTexture(cc::ResourceUpdateQueue* queue) { | 633 unsigned Layer::PrepareTexture(cc::ResourceUpdateQueue* queue) { |
| 634 DCHECK(texture_layer_); | 634 DCHECK(texture_layer_); |
| 635 return texture_->PrepareTexture(); | 635 return texture_->PrepareTexture(); |
| 636 } | 636 } |
| 637 | 637 |
| 638 WebKit::WebGraphicsContext3D* Layer::Context3d() { | 638 WebKit::WebGraphicsContext3D* Layer::Context3d() { |
| 639 DCHECK(texture_layer_); | 639 DCHECK(texture_layer_); |
| 640 return texture_->HostContext3D(); | 640 return texture_->HostContext3D(); |
| 641 } | 641 } |
| 642 | 642 |
| 643 bool Layer::PrepareTextureMailbox(cc::TextureMailbox*) { |
| 644 return false; |
| 645 } |
| 646 |
| 643 void Layer::SetForceRenderSurface(bool force) { | 647 void Layer::SetForceRenderSurface(bool force) { |
| 644 if (force_render_surface_ == force) | 648 if (force_render_surface_ == force) |
| 645 return; | 649 return; |
| 646 | 650 |
| 647 force_render_surface_ = force; | 651 force_render_surface_ = force; |
| 648 cc_layer_->SetForceRenderSurface(force_render_surface_); | 652 cc_layer_->SetForceRenderSurface(force_render_surface_); |
| 649 } | 653 } |
| 650 | 654 |
| 651 void Layer::OnAnimationStarted(const cc::AnimationEvent& event) { | 655 void Layer::OnAnimationStarted(const cc::AnimationEvent& event) { |
| 652 if (animator_) | 656 if (animator_) |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 926 texture_layer_->SetUV(uv_top_left, uv_bottom_right); | 930 texture_layer_->SetUV(uv_top_left, uv_bottom_right); |
| 927 } else if (delegated_renderer_layer_.get()) { | 931 } else if (delegated_renderer_layer_.get()) { |
| 928 delegated_renderer_layer_->SetDisplaySize( | 932 delegated_renderer_layer_->SetDisplaySize( |
| 929 ConvertSizeToPixel(this, delegated_frame_size_in_dip_)); | 933 ConvertSizeToPixel(this, delegated_frame_size_in_dip_)); |
| 930 size.ClampToMax(delegated_frame_size_in_dip_); | 934 size.ClampToMax(delegated_frame_size_in_dip_); |
| 931 } | 935 } |
| 932 cc_layer_->SetBounds(ConvertSizeToPixel(this, size)); | 936 cc_layer_->SetBounds(ConvertSizeToPixel(this, size)); |
| 933 } | 937 } |
| 934 | 938 |
| 935 } // namespace ui | 939 } // namespace ui |
| OLD | NEW |