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

Side by Side Diff: components/exo/buffer.h

Issue 1717283003: tracing: Make ConvertableToTraceFormat move-only scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 COMPONENTS_EXO_BUFFER_H_ 5 #ifndef COMPONENTS_EXO_BUFFER_H_
6 #define COMPONENTS_EXO_BUFFER_H_ 6 #define COMPONENTS_EXO_BUFFER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // be called before a new texture mailbox can be acquired unless 56 // be called before a new texture mailbox can be acquired unless
57 // |lost_context| is true. 57 // |lost_context| is true.
58 scoped_ptr<cc::SingleReleaseCallback> ProduceTextureMailbox( 58 scoped_ptr<cc::SingleReleaseCallback> ProduceTextureMailbox(
59 cc::TextureMailbox* mailbox, 59 cc::TextureMailbox* mailbox,
60 bool lost_context); 60 bool lost_context);
61 61
62 // Returns the size of the buffer. 62 // Returns the size of the buffer.
63 gfx::Size GetSize() const; 63 gfx::Size GetSize() const;
64 64
65 // Returns a trace value representing the state of the buffer. 65 // Returns a trace value representing the state of the buffer.
66 scoped_refptr<base::trace_event::TracedValue> AsTracedValue() const; 66 scoped_ptr<base::trace_event::TracedValue> AsTracedValue() const;
67 67
68 private: 68 private:
69 class Texture; 69 class Texture;
70 70
71 // Decrements the use count of buffer and notifies the client that buffer 71 // Decrements the use count of buffer and notifies the client that buffer
72 // as been released if it reached 0. 72 // as been released if it reached 0.
73 void Release(); 73 void Release();
74 74
75 // This is used by ProduceTextureMailbox() to produce a release callback 75 // This is used by ProduceTextureMailbox() to produce a release callback
76 // that releases a texture so it can be destroyed or reused. 76 // that releases a texture so it can be destroyed or reused.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 // The client release callback. 109 // The client release callback.
110 base::Closure release_callback_; 110 base::Closure release_callback_;
111 111
112 DISALLOW_COPY_AND_ASSIGN(Buffer); 112 DISALLOW_COPY_AND_ASSIGN(Buffer);
113 }; 113 };
114 114
115 } // namespace exo 115 } // namespace exo
116 116
117 #endif // COMPONENTS_EXO_BUFFER_H_ 117 #endif // COMPONENTS_EXO_BUFFER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698