| 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 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 } | 651 } |
| 652 | 652 |
| 653 if (delegate_) | 653 if (delegate_) |
| 654 delegate_->OnPaintLayer(canvas.get()); | 654 delegate_->OnPaintLayer(canvas.get()); |
| 655 if (scale_content) | 655 if (scale_content) |
| 656 canvas->Restore(); | 656 canvas->Restore(); |
| 657 } | 657 } |
| 658 | 658 |
| 659 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } | 659 bool Layer::FillsBoundsCompletely() const { return fills_bounds_completely_; } |
| 660 | 660 |
| 661 unsigned Layer::PrepareTexture() { | |
| 662 NOTREACHED(); | |
| 663 return 0; | |
| 664 } | |
| 665 | |
| 666 bool Layer::PrepareTextureMailbox( | 661 bool Layer::PrepareTextureMailbox( |
| 667 cc::TextureMailbox* mailbox, | 662 cc::TextureMailbox* mailbox, |
| 668 scoped_ptr<cc::SingleReleaseCallback>* release_callback, | 663 scoped_ptr<cc::SingleReleaseCallback>* release_callback, |
| 669 bool use_shared_memory) { | 664 bool use_shared_memory) { |
| 670 if (!mailbox_release_callback_) | 665 if (!mailbox_release_callback_) |
| 671 return false; | 666 return false; |
| 672 *mailbox = mailbox_; | 667 *mailbox = mailbox_; |
| 673 *release_callback = mailbox_release_callback_.Pass(); | 668 *release_callback = mailbox_release_callback_.Pass(); |
| 674 return true; | 669 return true; |
| 675 } | 670 } |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 cc_layer_->SetBounds(ConvertSizeToPixel(this, size)); | 947 cc_layer_->SetBounds(ConvertSizeToPixel(this, size)); |
| 953 } | 948 } |
| 954 | 949 |
| 955 void Layer::RecomputePosition() { | 950 void Layer::RecomputePosition() { |
| 956 cc_layer_->SetPosition(gfx::ScalePoint( | 951 cc_layer_->SetPosition(gfx::ScalePoint( |
| 957 gfx::PointF(bounds_.x(), bounds_.y()), | 952 gfx::PointF(bounds_.x(), bounds_.y()), |
| 958 device_scale_factor_)); | 953 device_scale_factor_)); |
| 959 } | 954 } |
| 960 | 955 |
| 961 } // namespace ui | 956 } // namespace ui |
| OLD | NEW |