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

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

Issue 17948002: Update Linux to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | Annotate | Revision Log
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 #ifndef CC_LAYERS_TEXTURE_LAYER_H_ 5 #ifndef CC_LAYERS_TEXTURE_LAYER_H_
6 #define CC_LAYERS_TEXTURE_LAYER_H_ 6 #define CC_LAYERS_TEXTURE_LAYER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 TextureLayer(TextureLayerClient* client, bool uses_mailbox); 87 TextureLayer(TextureLayerClient* client, bool uses_mailbox);
88 virtual ~TextureLayer(); 88 virtual ~TextureLayer();
89 89
90 private: 90 private:
91 class MailboxHolder : public base::RefCountedThreadSafe<MailboxHolder> { 91 class MailboxHolder : public base::RefCountedThreadSafe<MailboxHolder> {
92 public: 92 public:
93 class MainThreadReference { 93 class MainThreadReference {
94 public: 94 public:
95 explicit MainThreadReference(MailboxHolder* holder); 95 explicit MainThreadReference(MailboxHolder* holder);
96 ~MainThreadReference(); 96 ~MainThreadReference();
97 MailboxHolder* holder() { return holder_; } 97 MailboxHolder* holder() { return holder_.get(); }
98 98
99 private: 99 private:
100 scoped_refptr<MailboxHolder> holder_; 100 scoped_refptr<MailboxHolder> holder_;
101 DISALLOW_COPY_AND_ASSIGN(MainThreadReference); 101 DISALLOW_COPY_AND_ASSIGN(MainThreadReference);
102 }; 102 };
103 103
104 static scoped_ptr<MainThreadReference> Create( 104 static scoped_ptr<MainThreadReference> Create(
105 const TextureMailbox& mailbox); 105 const TextureMailbox& mailbox);
106 106
107 const TextureMailbox& mailbox() const { return mailbox_; } 107 const TextureMailbox& mailbox() const { return mailbox_; }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 unsigned texture_id_; 148 unsigned texture_id_;
149 scoped_ptr<MailboxHolder::MainThreadReference> holder_ref_; 149 scoped_ptr<MailboxHolder::MainThreadReference> holder_ref_;
150 bool needs_set_mailbox_; 150 bool needs_set_mailbox_;
151 151
152 DISALLOW_COPY_AND_ASSIGN(TextureLayer); 152 DISALLOW_COPY_AND_ASSIGN(TextureLayer);
153 }; 153 };
154 154
155 } // namespace cc 155 } // namespace cc
156 #endif // CC_LAYERS_TEXTURE_LAYER_H_ 156 #endif // CC_LAYERS_TEXTURE_LAYER_H_
OLDNEW
« no previous file with comments | « base/memory/ref_counted_delete_on_message_loop.h ('k') | cc/resources/pixel_buffer_raster_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698