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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 12330129: Make WaitSyncPoint go through command buffers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder_mock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 09f73aee94f32aa45a0e990f5aedf5cad4f5d7df..c8698ecb03f22ea63d0d9e1708484f2464b3ee7f 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -558,6 +558,8 @@ class GLES2DecoderImpl : public GLES2Decoder {
const base::Callback<void(gfx::Size)>& callback) OVERRIDE;
virtual void SetMsgCallback(const MsgCallback& callback) OVERRIDE;
+ virtual void SetWaitSyncPointCallback(
+ const WaitSyncPointCallback& callback) OVERRIDE;
virtual void SetStreamTextureManager(StreamTextureManager* manager) OVERRIDE;
@@ -1631,6 +1633,7 @@ class GLES2DecoderImpl : public GLES2Decoder {
base::Callback<void(gfx::Size)> resize_callback_;
MsgCallback msg_callback_;
+ WaitSyncPointCallback wait_sync_point_callback_;
StreamTextureManager* stream_texture_manager_;
scoped_ptr<gfx::AsyncPixelTransferDelegate> async_pixel_transfer_delegate_;
@@ -2978,6 +2981,11 @@ void GLES2DecoderImpl::SetMsgCallback(const MsgCallback& callback) {
msg_callback_ = callback;
}
+void GLES2DecoderImpl::SetWaitSyncPointCallback(
+ const WaitSyncPointCallback& callback) {
+ wait_sync_point_callback_ = callback;
+}
+
void GLES2DecoderImpl::SetStreamTextureManager(StreamTextureManager* manager) {
stream_texture_manager_ = manager;
}
@@ -9008,6 +9016,15 @@ error::Error GLES2DecoderImpl::HandleLoseContextCHROMIUM(
return error::kLostContext;
}
+error::Error GLES2DecoderImpl::HandleWaitSyncPointCHROMIUM(
+ uint32 immediate_data_size, const gles2::WaitSyncPointCHROMIUM& c) {
+ if (wait_sync_point_callback_.is_null())
+ return error::kNoError;
+
+ return wait_sync_point_callback_.Run(c.sync_point) ?
+ error::kNoError : error::kDeferCommandUntilLater;
+}
+
bool GLES2DecoderImpl::GenQueriesEXTHelper(
GLsizei n, const GLuint* client_ids) {
for (GLsizei ii = 0; ii < n; ++ii) {
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698