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

Issue 2516063002: Always restore GL scissor box in GLRenderer::RestoreGLState() (Closed)

Created:
4 years, 1 month ago by trchen
Modified:
4 years ago
Reviewers:
enne (OOO)
CC:
cc-bugs_chromium.org, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Always restore GL scissor box in GLRenderer::RestoreGLState() GLRenderer::RestoreGLState() doesn't restore scissor box correctly when the scissor was disabled. The following call sequence triggers this bug: renderer->SetScissorTestRect(gfx::Rect(0, 0, 800, 600)); renderer->EnsureScissorTestDisabled(); ScopedUseGrContext::ScopedUseGrContext() gl_->Scissor(1, 2, 3, 4); ScopedUseGrContext::~ScopedUseGrContext() renderer->SetScissorTestRect(gfx::Rect(0, 0, 800, 600)); The last call to SetScissorTestRect will enable scissor test but not setting scissor rect because it thought it was already 800x600. This CL fixes it by unconditionally restore scissor rect in RestoreGLState, and scissor_rect_needs_reset_ is no longer needed. CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Committed: https://crrev.com/db79085ae904b4b9f9c24f1c5ae26f9de83ae750 Cr-Commit-Position: refs/heads/master@{#434121}

Patch Set 1 #

Total comments: 5

Patch Set 2 : update unittest #

Patch Set 3 : fix tests (GetIntegerv wants initialized output array) #

Patch Set 4 : fix tests again (GetIntegerv is no-op in test mock) #

Patch Set 5 : fix tests for real (why do you want me to suffer, GetIntegerv?) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -11 lines) Patch
M cc/output/gl_renderer.h View 1 chunk +0 lines, -1 line 0 comments Download
M cc/output/gl_renderer.cc View 1 2 3 4 4 chunks +21 lines, -10 lines 0 comments Download
M cc/output/gl_renderer_unittest.cc View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 41 (32 generated)
trchen
4 years, 1 month ago (2016-11-19 06:51:14 UTC) #5
enne (OOO)
Is there a BUG= or a failing test here? https://codereview.chromium.org/2516063002/diff/1/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/2516063002/diff/1/cc/output/gl_renderer.cc#newcode3733 cc/output/gl_renderer.cc:3733: ...
4 years, 1 month ago (2016-11-21 00:47:44 UTC) #8
trchen
On 2016/11/21 00:47:44, enne wrote: > Is there a BUG= or a failing test here? ...
4 years, 1 month ago (2016-11-21 22:36:15 UTC) #9
enne (OOO)
Sure, lgtm https://codereview.chromium.org/2516063002/diff/1/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/2516063002/diff/1/cc/output/gl_renderer.cc#newcode3733 cc/output/gl_renderer.cc:3733: scissor_rect_ = gfx::Rect(0, 0, 0, 0); On ...
4 years, 1 month ago (2016-11-21 23:08:05 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2516063002/80001
4 years ago (2016-11-23 03:16:48 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/320605)
4 years ago (2016-11-23 04:34:46 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2516063002/80001
4 years ago (2016-11-23 04:48:28 UTC) #37
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years ago (2016-11-23 05:35:23 UTC) #39
commit-bot: I haz the power
4 years ago (2016-11-23 05:39:13 UTC) #41
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/db79085ae904b4b9f9c24f1c5ae26f9de83ae750
Cr-Commit-Position: refs/heads/master@{#434121}

Powered by Google App Engine
This is Rietveld 408576698