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

Side by Side Diff: gpu/command_buffer/common/command_buffer.h

Issue 896723008: Add OrderingBarrierCHROMIUM API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update unit test classes. Created 5 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_H_ 5 #ifndef GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_H_
6 #define GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_H_ 6 #define GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_H_
7 7
8 #include "gpu/command_buffer/common/buffer.h" 8 #include "gpu/command_buffer/common/buffer.h"
9 #include "gpu/command_buffer/common/constants.h" 9 #include "gpu/command_buffer/common/constants.h"
10 #include "gpu/gpu_export.h" 10 #include "gpu/gpu_export.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // by code that needs to know the last token so it can be slower but more up 83 // by code that needs to know the last token so it can be slower but more up
84 // to date than GetLastState. 84 // to date than GetLastState.
85 virtual int32 GetLastToken() = 0; 85 virtual int32 GetLastToken() = 0;
86 86
87 // The writer calls this to update its put offset. This ensures the reader 87 // The writer calls this to update its put offset. This ensures the reader
88 // sees the latest added commands, and will eventually process them. On the 88 // sees the latest added commands, and will eventually process them. On the
89 // service side, commands are processed up to the given put_offset before 89 // service side, commands are processed up to the given put_offset before
90 // subsequent Flushes on the same GpuChannel. 90 // subsequent Flushes on the same GpuChannel.
91 virtual void Flush(int32 put_offset) = 0; 91 virtual void Flush(int32 put_offset) = 0;
92 92
93 // As Flush, ensuress that on the service side, commands up to put_offset
piman 2015/02/05 01:14:15 typo: ensuress
piman 2015/02/06 03:37:48 Still here in PS#7...
vmiura 2015/02/06 05:15:22 Done.
94 // are processed but before subsequent Flushes on the GpuChannel, however
95 // the reader may not see the latest commands until Flushes on the channel.
96 virtual void ShallowFlush(int32 put_offset) = 0;
97
93 // The writer calls this to wait until the current token is within a 98 // The writer calls this to wait until the current token is within a
94 // specific range, inclusive. Can return early if an error is generated. 99 // specific range, inclusive. Can return early if an error is generated.
95 virtual void WaitForTokenInRange(int32 start, int32 end) = 0; 100 virtual void WaitForTokenInRange(int32 start, int32 end) = 0;
96 101
97 // The writer calls this to wait until the current get offset is within a 102 // The writer calls this to wait until the current get offset is within a
98 // specific range, inclusive. Can return early if an error is generated. 103 // specific range, inclusive. Can return early if an error is generated.
99 virtual void WaitForGetOffsetInRange(int32 start, int32 end) = 0; 104 virtual void WaitForGetOffsetInRange(int32 start, int32 end) = 0;
100 105
101 // Sets the buffer commands are read from. 106 // Sets the buffer commands are read from.
102 // Also resets the get and put offsets to 0. 107 // Also resets the get and put offsets to 0.
(...skipping 18 matching lines...) Expand all
121 virtual error::Error GetLastError(); 126 virtual error::Error GetLastError();
122 #endif 127 #endif
123 128
124 private: 129 private:
125 DISALLOW_COPY_AND_ASSIGN(CommandBuffer); 130 DISALLOW_COPY_AND_ASSIGN(CommandBuffer);
126 }; 131 };
127 132
128 } // namespace gpu 133 } // namespace gpu
129 134
130 #endif // GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_H_ 135 #endif // GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698