OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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 "cc/layers/texture_layer.h" | 5 #include "cc/layers/texture_layer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 PassAs<LayerImpl>(); | 62 PassAs<LayerImpl>(); |
63 } | 63 } |
64 | 64 |
65 void TextureLayer::SetFlipped(bool flipped) { | 65 void TextureLayer::SetFlipped(bool flipped) { |
66 if (flipped_ == flipped) | 66 if (flipped_ == flipped) |
67 return; | 67 return; |
68 flipped_ = flipped; | 68 flipped_ = flipped; |
69 SetNeedsCommit(); | 69 SetNeedsCommit(); |
70 } | 70 } |
71 | 71 |
72 void TextureLayer::SetUV(gfx::PointF top_left, gfx::PointF bottom_right) { | 72 void TextureLayer::SetUV(const gfx::PointF& top_left, |
| 73 const gfx::PointF& bottom_right) { |
73 if (uv_top_left_ == top_left && uv_bottom_right_ == bottom_right) | 74 if (uv_top_left_ == top_left && uv_bottom_right_ == bottom_right) |
74 return; | 75 return; |
75 uv_top_left_ = top_left; | 76 uv_top_left_ = top_left; |
76 uv_bottom_right_ = bottom_right; | 77 uv_bottom_right_ = bottom_right; |
77 SetNeedsCommit(); | 78 SetNeedsCommit(); |
78 } | 79 } |
79 | 80 |
80 void TextureLayer::SetVertexOpacity(float bottom_left, | 81 void TextureLayer::SetVertexOpacity(float bottom_left, |
81 float top_left, | 82 float top_left, |
82 float top_right, | 83 float top_right, |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 } | 347 } |
347 | 348 |
348 void TextureLayer::MailboxHolder::ReturnAndReleaseOnImplThread( | 349 void TextureLayer::MailboxHolder::ReturnAndReleaseOnImplThread( |
349 unsigned sync_point, bool is_lost) { | 350 unsigned sync_point, bool is_lost) { |
350 Return(sync_point, is_lost); | 351 Return(sync_point, is_lost); |
351 message_loop_->PostTask(FROM_HERE, | 352 message_loop_->PostTask(FROM_HERE, |
352 base::Bind(&MailboxHolder::InternalRelease, this)); | 353 base::Bind(&MailboxHolder::InternalRelease, this)); |
353 } | 354 } |
354 | 355 |
355 } // namespace cc | 356 } // namespace cc |
OLD | NEW |