Commit 46fc59f9 authored by Jonathan Backer's avatar Jonathan Backer Committed by Commit Bot

Fix up failing DCHECK with --enable-vulkan

Change-Id: I96ef67192107f46e5524a406535c1c1fa51fbc80
Reviewed-on: https://chromium-review.googlesource.com/c/1374392Reviewed-by: default avatarPeng Huang <penghuang@chromium.org>
Commit-Queue: Jonathan Backer <backer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616023}
parent d01e52be
...@@ -767,7 +767,7 @@ ContextResult RasterDecoderImpl::Initialize( ...@@ -767,7 +767,7 @@ ContextResult RasterDecoderImpl::Initialize(
const gles2::DisallowedFeatures& disallowed_features, const gles2::DisallowedFeatures& disallowed_features,
const ContextCreationAttribs& attrib_helper) { const ContextCreationAttribs& attrib_helper) {
TRACE_EVENT0("gpu", "RasterDecoderImpl::Initialize"); TRACE_EVENT0("gpu", "RasterDecoderImpl::Initialize");
DCHECK(context->IsCurrent(surface.get())); DCHECK(raster_decoder_context_state_->IsCurrent(surface.get()));
DCHECK(!context_.get()); DCHECK(!context_.get());
set_initialized(); set_initialized();
......
...@@ -31,7 +31,7 @@ class WrappedSkImage : public SharedImageBacking { ...@@ -31,7 +31,7 @@ class WrappedSkImage : public SharedImageBacking {
public: public:
~WrappedSkImage() override { ~WrappedSkImage() override {
DCHECK(context_state_->context_lost() || DCHECK(context_state_->context_lost() ||
context_state_->context()->IsCurrent(nullptr)); context_state_->IsCurrent(nullptr));
if (!context_state_->context_lost()) if (!context_state_->context_lost())
context_state_->need_context_state_reset = true; context_state_->need_context_state_reset = true;
} }
...@@ -72,7 +72,7 @@ class WrappedSkImage : public SharedImageBacking { ...@@ -72,7 +72,7 @@ class WrappedSkImage : public SharedImageBacking {
const SkSurfaceProps& surface_props) { const SkSurfaceProps& surface_props) {
if (context_state_->context_lost()) if (context_state_->context_lost())
return nullptr; return nullptr;
DCHECK(context_state_->context()->IsCurrent(nullptr)); DCHECK(context_state_->IsCurrent(nullptr));
GrBackendTexture gr_texture = GrBackendTexture gr_texture =
image_->getBackendTexture(/*flushPendingGrContextIO=*/true); image_->getBackendTexture(/*flushPendingGrContextIO=*/true);
DCHECK(gr_texture.isValid()); DCHECK(gr_texture.isValid());
...@@ -115,7 +115,7 @@ class WrappedSkImage : public SharedImageBacking { ...@@ -115,7 +115,7 @@ class WrappedSkImage : public SharedImageBacking {
bool Initialize(const SkImageInfo& info) { bool Initialize(const SkImageInfo& info) {
if (context_state_->context_lost()) if (context_state_->context_lost())
return false; return false;
DCHECK(context_state_->context()->IsCurrent(nullptr)); DCHECK(context_state_->IsCurrent(nullptr));
context_state_->need_context_state_reset = true; context_state_->need_context_state_reset = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment