| 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* mailbox) { |
| 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 931 cc_layer_->SetBounds(ConvertSizeToPixel(this, size)); | 935 cc_layer_->SetBounds(ConvertSizeToPixel(this, size)); |
| 932 } | 936 } |
| 933 | 937 |
| 934 void Layer::RecomputePosition() { | 938 void Layer::RecomputePosition() { |
| 935 cc_layer_->SetPosition(gfx::ScalePoint( | 939 cc_layer_->SetPosition(gfx::ScalePoint( |
| 936 gfx::PointF(bounds_.x(), bounds_.y()), | 940 gfx::PointF(bounds_.x(), bounds_.y()), |
| 937 device_scale_factor_)); | 941 device_scale_factor_)); |
| 938 } | 942 } |
| 939 | 943 |
| 940 } // namespace ui | 944 } // namespace ui |
| OLD | NEW |