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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc

Issue 2673473002: Rename SwapBuffersWithDamage to SwapBuffersWithBounds (Closed)
Patch Set: fix windows compile warning Created 3 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) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 #include "gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 8
9 namespace gpu { 9 namespace gpu {
10 namespace gles2 { 10 namespace gles2 {
(...skipping 2649 matching lines...) Expand 10 before | Expand all | Expand 10 after
2660 2660
2661 if (translated_source_length > 0) { 2661 if (translated_source_length > 0) {
2662 std::vector<char> buffer(translated_source_length, 0); 2662 std::vector<char> buffer(translated_source_length, 0);
2663 glGetTranslatedShaderSourceANGLE(service_id, translated_source_length, 2663 glGetTranslatedShaderSourceANGLE(service_id, translated_source_length,
2664 nullptr, buffer.data()); 2664 nullptr, buffer.data());
2665 *source = std::string(buffer.data()); 2665 *source = std::string(buffer.data());
2666 } 2666 }
2667 return error::kNoError; 2667 return error::kNoError;
2668 } 2668 }
2669 2669
2670 error::Error GLES2DecoderPassthroughImpl::DoSwapBuffersWithDamageCHROMIUM( 2670 error::Error GLES2DecoderPassthroughImpl::DoSwapBuffersWithBoundsCHROMIUM(
2671 GLint x, 2671 GLsizei count,
2672 GLint y, 2672 const volatile GLint* rects) {
2673 GLint width, 2673 std::vector<gfx::Rect> bounds(count);
2674 GLint height) { 2674 for (GLsizei i = 0; i < count; ++i) {
2675 gfx::SwapResult result = surface_->PostSubBuffer(x, y, width, height); 2675 bounds[i] = gfx::Rect(rects[i * 4 + 0], rects[i * 4 + 1], rects[i * 4 + 2],
2676 rects[i * 4 + 3]);
2677 }
2678 gfx::SwapResult result = surface_->SwapBuffersWithBounds(bounds);
2676 if (result == gfx::SwapResult::SWAP_FAILED) { 2679 if (result == gfx::SwapResult::SWAP_FAILED) {
2677 LOG(ERROR) << "Context lost because PostSubBuffer failed."; 2680 LOG(ERROR) << "Context lost because SwapBuffersWithBounds failed.";
2678 } 2681 }
2679 // TODO(geofflang): force the context loss? 2682 // TODO(geofflang): force the context loss?
2680 return error::kNoError; 2683 return error::kNoError;
2681 } 2684 }
2682 2685
2683 error::Error GLES2DecoderPassthroughImpl::DoPostSubBufferCHROMIUM( 2686 error::Error GLES2DecoderPassthroughImpl::DoPostSubBufferCHROMIUM(
2684 GLint x, 2687 GLint x,
2685 GLint y, 2688 GLint y,
2686 GLint width, 2689 GLint width,
2687 GLint height) { 2690 GLint height) {
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
3319 GLuint texture, 3322 GLuint texture,
3320 GLboolean promotion_hint, 3323 GLboolean promotion_hint,
3321 GLint display_x, 3324 GLint display_x,
3322 GLint display_y) { 3325 GLint display_y) {
3323 NOTIMPLEMENTED(); 3326 NOTIMPLEMENTED();
3324 return error::kNoError; 3327 return error::kNoError;
3325 } 3328 }
3326 3329
3327 } // namespace gles2 3330 } // namespace gles2
3328 } // namespace gpu 3331 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698