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/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 updated = true; | 194 updated = true; |
195 } | 195 } |
196 } | 196 } |
197 | 197 |
198 // SetTextureMailbox could be called externally and the same mailbox used for | 198 // SetTextureMailbox could be called externally and the same mailbox used for |
199 // different textures. Such callers notify this layer that the texture has | 199 // different textures. Such callers notify this layer that the texture has |
200 // changed by calling SetNeedsDisplay, so check for that here. | 200 // changed by calling SetNeedsDisplay, so check for that here. |
201 return updated || !update_rect().IsEmpty(); | 201 return updated || !update_rect().IsEmpty(); |
202 } | 202 } |
203 | 203 |
| 204 bool TextureLayer::IsSnapped() { |
| 205 return true; |
| 206 } |
| 207 |
204 void TextureLayer::PushPropertiesTo(LayerImpl* layer) { | 208 void TextureLayer::PushPropertiesTo(LayerImpl* layer) { |
205 Layer::PushPropertiesTo(layer); | 209 Layer::PushPropertiesTo(layer); |
206 TRACE_EVENT0("cc", "TextureLayer::PushPropertiesTo"); | 210 TRACE_EVENT0("cc", "TextureLayer::PushPropertiesTo"); |
207 | 211 |
208 TextureLayerImpl* texture_layer = static_cast<TextureLayerImpl*>(layer); | 212 TextureLayerImpl* texture_layer = static_cast<TextureLayerImpl*>(layer); |
209 texture_layer->SetFlipped(flipped_); | 213 texture_layer->SetFlipped(flipped_); |
210 texture_layer->SetNearestNeighbor(nearest_neighbor_); | 214 texture_layer->SetNearestNeighbor(nearest_neighbor_); |
211 texture_layer->SetUVTopLeft(uv_top_left_); | 215 texture_layer->SetUVTopLeft(uv_top_left_); |
212 texture_layer->SetUVBottomRight(uv_bottom_right_); | 216 texture_layer->SetUVBottomRight(uv_bottom_right_); |
213 texture_layer->SetVertexOpacity(vertex_opacity_); | 217 texture_layer->SetVertexOpacity(vertex_opacity_); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 void TextureLayer::TextureMailboxHolder::ReturnAndReleaseOnImplThread( | 297 void TextureLayer::TextureMailboxHolder::ReturnAndReleaseOnImplThread( |
294 const gpu::SyncToken& sync_token, | 298 const gpu::SyncToken& sync_token, |
295 bool is_lost, | 299 bool is_lost, |
296 BlockingTaskRunner* main_thread_task_runner) { | 300 BlockingTaskRunner* main_thread_task_runner) { |
297 Return(sync_token, is_lost); | 301 Return(sync_token, is_lost); |
298 main_thread_task_runner->PostTask( | 302 main_thread_task_runner->PostTask( |
299 FROM_HERE, base::Bind(&TextureMailboxHolder::InternalRelease, this)); | 303 FROM_HERE, base::Bind(&TextureMailboxHolder::InternalRelease, this)); |
300 } | 304 } |
301 | 305 |
302 } // namespace cc | 306 } // namespace cc |
OLD | NEW |