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

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

Issue 782583003: List sync points to wait on in AsyncFlush message Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // Returns the last token without synchronizing with the service. Note that 80 // Returns the last token without synchronizing with the service. Note that
81 // while you could just call GetLastState().token, GetLastState needs to be 81 // while you could just call GetLastState().token, GetLastState needs to be
82 // fast as it is called for every command where GetLastToken is only called 82 // fast as it is called for every command where GetLastToken is only called
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. sync_points contains the set
91 virtual void Flush(int32 put_offset) = 0; 91 // of sync points that will be waited on before executing the commands.
92 virtual void Flush(int32 put_offset,
93 const std::vector<uint32>& sync_points) = 0;
92 94
93 // The writer calls this to wait until the current token is within a 95 // 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. 96 // specific range, inclusive. Can return early if an error is generated.
95 virtual void WaitForTokenInRange(int32 start, int32 end) = 0; 97 virtual void WaitForTokenInRange(int32 start, int32 end) = 0;
96 98
97 // The writer calls this to wait until the current get offset is within a 99 // 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. 100 // specific range, inclusive. Can return early if an error is generated.
99 virtual void WaitForGetOffsetInRange(int32 start, int32 end) = 0; 101 virtual void WaitForGetOffsetInRange(int32 start, int32 end) = 0;
100 102
101 // Sets the buffer commands are read from. 103 // Sets the buffer commands are read from.
(...skipping 19 matching lines...) Expand all
121 virtual error::Error GetLastError(); 123 virtual error::Error GetLastError();
122 #endif 124 #endif
123 125
124 private: 126 private:
125 DISALLOW_COPY_AND_ASSIGN(CommandBuffer); 127 DISALLOW_COPY_AND_ASSIGN(CommandBuffer);
126 }; 128 };
127 129
128 } // namespace gpu 130 } // namespace gpu
129 131
130 #endif // GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_H_ 132 #endif // GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/transfer_buffer_unittest.cc ('k') | gpu/command_buffer/common/command_buffer_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698