Fix corrupted glDepthMask in SkImage destructor Quoting vasilyt: So what happens: * We made current virtual context of GLES2 Decoder. * Someone deleted shared image SharedImageStub::OnDestroySharedImage. * For performance reasons, SharedImageStub::MakeContextCurrent doesn't switch virtual contexts, only real. It's done in assumptions, that we don't really change GL state during it, just deleting resources (e.g textures) [1]. * This assumption is wrong because of workaround (and maybe something else) here [2] This is similar to https://crbug.com/1095679, but in dtor. We need context_state_->MakeCurrent(nullptr); in the beginning of ~WrappedSkImage [3] What is interesting -- there is DCHECK for context_state_->IsCurrent(), but if I read code correctly, that only checks for real context to be current and I'm not sure if that's right. [1] https://source.chromium.org/chromium/chromium/src/+/master:gpu/ipc/service/shared_image_stub.cc;drc=8cd33c0a2ffc73d284354e431687011534e29fb8;l=458 [2] https://source.chromium.org/chromium/chromium/src/+/master:third_party/skia/src/gpu/gl/GrGLGpu.cpp;drc=ae67c52933d2da6ea7b9cdff251738487bb84c74;l=2941 [3] https://source.chromium.org/chromium/chromium/src/+/master:gpu/command_buffer/service/wrapped_sk_image.cc;drc=67a4fbcab976e3c625bd241e10c3c3bed305137e;l=54 Bug: 1167450,1184085 Change-Id: I6577b0d59575e499b92bda9f31dcfec4eca2f5d1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2729901 Commit-Queue: Klaus Weidner <klausw@chromium.org> Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Cr-Commit-Position: refs/heads/master@{#859662}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.