|
|
Chromium Code Reviews|
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. |
DescriptionAlways 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?) #
Messages
Total messages: 41 (32 generated)
Description was changed from ========== 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. ========== to ========== 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 ==========
The CQ bit was checked by trchen@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
trchen@chromium.org changed reviewers: + enne@chromium.org
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: blimp_linux_dbg on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/blimp_linux_dbg...)
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#ne... cc/output/gl_renderer.cc:3733: scissor_rect_ = gfx::Rect(0, 0, 0, 0); I think this is not correct. If something sets the scissor to the empty rect, then this will early out and not actually set the scissor. https://codereview.chromium.org/2516063002/diff/1/cc/output/gl_renderer.cc#ne... cc/output/gl_renderer.cc:3770: gl_->Scissor(scissor_rect_.x(), scissor_rect_.y(), scissor_rect_.width(), I think a patch that just does this line of code this would be great without the other changes.
On 2016/11/21 00:47:44, enne wrote: > Is there a BUG= or a failing test here? Found this bug when I ran layout test with a SPv2 CL. https://codereview.chromium.org/2495973002/ compositing/culling/filter-occlusion-blur.html I feel the added DCHECK will be good enough for test coverage. 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#ne... cc/output/gl_renderer.cc:3733: scissor_rect_ = gfx::Rect(0, 0, 0, 0); On 2016/11/21 00:47:44, enne wrote: > I think this is not correct. If something sets the scissor to the empty rect, > then this will early out and not actually set the scissor. Shouldn't it early out because the scissor rect is already reset to empty? https://codereview.chromium.org/2516063002/diff/1/cc/output/gl_renderer.cc#ne... cc/output/gl_renderer.cc:3770: gl_->Scissor(scissor_rect_.x(), scissor_rect_.y(), scissor_rect_.width(), On 2016/11/21 00:47:44, enne wrote: > I think a patch that just does this line of code this would be great without the > other changes. Sure it will still fix the bug. I don't see why the extra complexity is needed though...
The CQ bit was checked by trchen@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
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#ne... cc/output/gl_renderer.cc:3733: scissor_rect_ = gfx::Rect(0, 0, 0, 0); On 2016/11/21 at 22:36:15, trchen wrote: > On 2016/11/21 00:47:44, enne wrote: > > I think this is not correct. If something sets the scissor to the empty rect, > > then this will early out and not actually set the scissor. > > Shouldn't it early out because the scissor rect is already reset to empty? Ok sure, I guess ReinitializeGLState always calls RestoreGLState.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: blimp_linux_dbg on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/blimp_linux_dbg...)
The CQ bit was checked by trchen@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by trchen@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
The CQ bit was checked by trchen@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
The CQ bit was checked by trchen@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: 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_...)
The CQ bit was checked by trchen@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from enne@chromium.org Link to the patchset: https://codereview.chromium.org/2516063002/#ps80001 (title: "fix tests for real (why do you want me to suffer, GetIntegerv?)")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
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_...)
The CQ bit was checked by trchen@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 80001, "attempt_start_ts": 1479876495244150,
"parent_rev": "2178df1f70a8ec26170ef7bbebfd2c066dafdeda", "commit_rev":
"9250cda393aaa58e8701f6561398299b8b17c6e7"}
Message was sent while issue was closed.
Committed patchset #5 (id:80001)
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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} ==========
Message was sent while issue was closed.
Patchset 5 (id:??) landed as https://crrev.com/db79085ae904b4b9f9c24f1c5ae26f9de83ae750 Cr-Commit-Position: refs/heads/master@{#434121} |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
