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 27 matching lines...) Expand all Loading... |
38 vertex_opacity_[2] = 1.0f; | 38 vertex_opacity_[2] = 1.0f; |
39 vertex_opacity_[3] = 1.0f; | 39 vertex_opacity_[3] = 1.0f; |
40 } | 40 } |
41 | 41 |
42 TextureLayer::~TextureLayer() { | 42 TextureLayer::~TextureLayer() { |
43 } | 43 } |
44 | 44 |
45 void TextureLayer::ClearClient() { | 45 void TextureLayer::ClearClient() { |
46 if (rate_limit_context_ && client_ && layer_tree_host()) | 46 if (rate_limit_context_ && client_ && layer_tree_host()) |
47 layer_tree_host()->StopRateLimiter(); | 47 layer_tree_host()->StopRateLimiter(); |
48 client_ = NULL; | 48 client_ = nullptr; |
49 ClearTexture(); | 49 ClearTexture(); |
50 UpdateDrawsContent(HasDrawableContent()); | 50 UpdateDrawsContent(HasDrawableContent()); |
51 } | 51 } |
52 | 52 |
53 void TextureLayer::ClearTexture() { | 53 void TextureLayer::ClearTexture() { |
54 SetTextureMailbox(TextureMailbox(), scoped_ptr<SingleReleaseCallback>()); | 54 SetTextureMailbox(TextureMailbox(), scoped_ptr<SingleReleaseCallback>()); |
55 } | 55 } |
56 | 56 |
57 scoped_ptr<LayerImpl> TextureLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) { | 57 scoped_ptr<LayerImpl> TextureLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) { |
58 return TextureLayerImpl::Create(tree_impl, id()); | 58 return TextureLayerImpl::Create(tree_impl, id()); |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 void TextureLayer::TextureMailboxHolder::ReturnAndReleaseOnImplThread( | 333 void TextureLayer::TextureMailboxHolder::ReturnAndReleaseOnImplThread( |
334 uint32 sync_point, | 334 uint32 sync_point, |
335 bool is_lost, | 335 bool is_lost, |
336 BlockingTaskRunner* main_thread_task_runner) { | 336 BlockingTaskRunner* main_thread_task_runner) { |
337 Return(sync_point, is_lost); | 337 Return(sync_point, is_lost); |
338 main_thread_task_runner->PostTask( | 338 main_thread_task_runner->PostTask( |
339 FROM_HERE, base::Bind(&TextureMailboxHolder::InternalRelease, this)); | 339 FROM_HERE, base::Bind(&TextureMailboxHolder::InternalRelease, this)); |
340 } | 340 } |
341 | 341 |
342 } // namespace cc | 342 } // namespace cc |
OLD | NEW |