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