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

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

Issue 2822513002: Let DoMapBufferRange write the result integer to signal a GL error. (Closed)
Patch Set: Created 3 years, 8 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
Index: gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
index d602360c369fbf5981ce8050b6f0eeb0b74b56a8..92f2b1c62ae9ba0157c4f109717087cadad91e60 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
@@ -2734,7 +2734,8 @@ error::Error GLES2DecoderPassthroughImpl::DoMapBufferRange(
GLbitfield access,
void* ptr,
int32_t data_shm_id,
- uint32_t data_shm_offset) {
+ uint32_t data_shm_offset,
+ uint32_t* result) {
FlushErrors();
GLbitfield filtered_access = access;
@@ -2759,6 +2760,7 @@ error::Error GLES2DecoderPassthroughImpl::DoMapBufferRange(
void* mapped_ptr = glMapBufferRange(target, offset, size, filtered_access);
if (FlushErrors() || mapped_ptr == nullptr) {
// Had an error while mapping, don't copy any data
+ *result = 0;
return error::kNoError;
}
@@ -2783,6 +2785,7 @@ error::Error GLES2DecoderPassthroughImpl::DoMapBufferRange(
resources_->mapped_buffer_map.insert(
std::make_pair(client_buffer, mapped_buffer_info));
+ *result = 1;
return error::kNoError;
}

Powered by Google App Engine
This is Rietveld 408576698