| 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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 return texture_->PrepareTexture(); | 650 return texture_->PrepareTexture(); |
| 651 } | 651 } |
| 652 | 652 |
| 653 WebKit::WebGraphicsContext3D* Layer::Context3d() { | 653 WebKit::WebGraphicsContext3D* Layer::Context3d() { |
| 654 DCHECK(texture_layer_.get()); | 654 DCHECK(texture_layer_.get()); |
| 655 if (texture_.get()) | 655 if (texture_.get()) |
| 656 return texture_->HostContext3D(); | 656 return texture_->HostContext3D(); |
| 657 return NULL; | 657 return NULL; |
| 658 } | 658 } |
| 659 | 659 |
| 660 bool Layer::PrepareTextureMailbox(cc::TextureMailbox* mailbox) { | 660 bool Layer::PrepareTextureMailbox(cc::TextureMailbox* mailbox, |
| 661 bool use_shared_memory) { |
| 661 return false; | 662 return false; |
| 662 } | 663 } |
| 663 | 664 |
| 664 void Layer::SetForceRenderSurface(bool force) { | 665 void Layer::SetForceRenderSurface(bool force) { |
| 665 if (force_render_surface_ == force) | 666 if (force_render_surface_ == force) |
| 666 return; | 667 return; |
| 667 | 668 |
| 668 force_render_surface_ = force; | 669 force_render_surface_ = force; |
| 669 cc_layer_->SetForceRenderSurface(force_render_surface_); | 670 cc_layer_->SetForceRenderSurface(force_render_surface_); |
| 670 } | 671 } |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 cc_layer_->SetBounds(ConvertSizeToPixel(this, size)); | 959 cc_layer_->SetBounds(ConvertSizeToPixel(this, size)); |
| 959 } | 960 } |
| 960 | 961 |
| 961 void Layer::RecomputePosition() { | 962 void Layer::RecomputePosition() { |
| 962 cc_layer_->SetPosition(gfx::ScalePoint( | 963 cc_layer_->SetPosition(gfx::ScalePoint( |
| 963 gfx::PointF(bounds_.x(), bounds_.y()), | 964 gfx::PointF(bounds_.x(), bounds_.y()), |
| 964 device_scale_factor_)); | 965 device_scale_factor_)); |
| 965 } | 966 } |
| 966 | 967 |
| 967 } // namespace ui | 968 } // namespace ui |
| OLD | NEW |