Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: cc/layers/texture_layer.cc

Issue 657103003: cc: Change scoped_ptr<T>() to nullptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/layer_unittest.cc ('k') | cc/layers/texture_layer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_ = nullptr; 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(), nullptr);
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());
59 } 59 }
60 60
61 void TextureLayer::SetFlipped(bool flipped) { 61 void TextureLayer::SetFlipped(bool flipped) {
62 if (flipped_ == flipped) 62 if (flipped_ == flipped)
63 return; 63 return;
64 flipped_ = flipped; 64 flipped_ = flipped;
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « cc/layers/layer_unittest.cc ('k') | cc/layers/texture_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698