Chromium Code Reviews| 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 cac909c99cc0da7560e2340690a27a80f11f65b3..a04207b0e30c55f7b63f5caa111957dca1397b9c 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc |
| @@ -2667,14 +2667,17 @@ error::Error GLES2DecoderPassthroughImpl::DoGetTranslatedShaderSourceANGLE( |
| return error::kNoError; |
| } |
| -error::Error GLES2DecoderPassthroughImpl::DoSwapBuffersWithDamageCHROMIUM( |
| - GLint x, |
| - GLint y, |
| - GLint width, |
| - GLint height) { |
| - gfx::SwapResult result = surface_->PostSubBuffer(x, y, width, height); |
| +error::Error GLES2DecoderPassthroughImpl::DoSwapBuffersWithBoundsCHROMIUM( |
| + GLsizei count, |
| + const volatile GLint* rects) { |
| + std::vector<gfx::Rect> bounds(count); |
| + for (GLsizei i = 0; i != count; ++i) { |
|
meacer
2017/02/02 21:42:33
Why not i < count?
halliwell
2017/02/03 20:17:00
Old habit :) Updated to <
|
| + bounds[i] = gfx::Rect(rects[i * 4 + 0], rects[i * 4 + 1], rects[i * 4 + 2], |
| + rects[i * 4 + 3]); |
| + } |
| + gfx::SwapResult result = surface_->SwapBuffersWithBounds(bounds); |
| if (result == gfx::SwapResult::SWAP_FAILED) { |
| - LOG(ERROR) << "Context lost because PostSubBuffer failed."; |
| + LOG(ERROR) << "Context lost because SwapBuffersWithBounds failed."; |
| } |
| // TODO(geofflang): force the context loss? |
| return error::kNoError; |