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

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

Issue 2404513002: exo: Implement zcr_linux_explicit_synchronization_v1
Patch Set: rebase, address review comments Created 4 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 | « no previous file | components/exo/buffer.cc » ('j') | components/exo/buffer.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "ui/gfx/geometry/size.h" 13 #include "ui/gfx/geometry/size.h"
14 14
15 namespace base { 15 namespace base {
16 namespace trace_event { 16 namespace trace_event {
17 class TracedValue; 17 class TracedValue;
18 } 18 }
19 } 19 }
20 20
21 namespace cc { 21 namespace cc {
22 class SingleReleaseCallback; 22 class SingleReleaseCallback;
23 class TextureMailbox; 23 class TextureMailbox;
24 } 24 }
25 25
26 namespace gfx { 26 namespace gfx {
27 class GpuFence;
27 class GpuMemoryBuffer; 28 class GpuMemoryBuffer;
28 } 29 }
29 30
30 namespace gpu { 31 namespace gpu {
31 struct SyncToken; 32 struct SyncToken;
32 } 33 }
33 34
34 namespace exo { 35 namespace exo {
35 36
36 // This class provides the content for a Surface. The mechanism by which a 37 // This class provides the content for a Surface. The mechanism by which a
(...skipping 15 matching lines...) Expand all
52 void set_release_callback(const base::Closure& release_callback) { 53 void set_release_callback(const base::Closure& release_callback) {
53 release_callback_ = release_callback; 54 release_callback_ = release_callback;
54 } 55 }
55 56
56 // This function can be used to acquire a texture mailbox for the contents of 57 // This function can be used to acquire a texture mailbox for the contents of
57 // buffer. Returns a release callback on success. The release callback should 58 // buffer. Returns a release callback on success. The release callback should
58 // be called before a new texture mailbox can be acquired unless 59 // be called before a new texture mailbox can be acquired unless
59 // |non_client_usage| is true. 60 // |non_client_usage| is true.
60 std::unique_ptr<cc::SingleReleaseCallback> ProduceTextureMailbox( 61 std::unique_ptr<cc::SingleReleaseCallback> ProduceTextureMailbox(
61 cc::TextureMailbox* mailbox, 62 cc::TextureMailbox* mailbox,
63 gfx::GpuFence* fence,
62 bool secure_output_only, 64 bool secure_output_only,
63 bool client_usage); 65 bool client_usage);
64 66
65 // This should be called when the buffer is attached to a Surface. 67 // This should be called when the buffer is attached to a Surface.
66 void OnAttach(); 68 void OnAttach();
67 69
68 // This should be called when the buffer is detached from a surface. 70 // This should be called when the buffer is detached from a surface.
69 void OnDetach(); 71 void OnDetach();
70 72
71 // Returns the size of the buffer. 73 // Returns the size of the buffer.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 128
127 // The client release callback. 129 // The client release callback.
128 base::Closure release_callback_; 130 base::Closure release_callback_;
129 131
130 DISALLOW_COPY_AND_ASSIGN(Buffer); 132 DISALLOW_COPY_AND_ASSIGN(Buffer);
131 }; 133 };
132 134
133 } // namespace exo 135 } // namespace exo
134 136
135 #endif // COMPONENTS_EXO_BUFFER_H_ 137 #endif // COMPONENTS_EXO_BUFFER_H_
OLDNEW
« no previous file with comments | « no previous file | components/exo/buffer.cc » ('j') | components/exo/buffer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698