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

Unified Diff: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp

Issue 2905633002: Bind framebuffer to fbo_ object before readPixels, rather than multisample_fbo_ (Closed)
Patch Set: rebase code Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
index acc92e22430d2df5e5482c13dd16b6208523f9ef..944abccd57353da75a6d16f166ab574c14fa5c1b 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -296,6 +296,7 @@ bool DrawingBuffer::PrepareTextureMailboxInternal(
bool DrawingBuffer::FinishPrepareTextureMailboxSoftware(
cc::TextureMailbox* out_mailbox,
std::unique_ptr<cc::SingleReleaseCallback>* out_release_callback) {
+ DCHECK(state_restorer_);
std::unique_ptr<cc::SharedBitmap> bitmap = CreateOrRecycleBitmap();
if (!bitmap)
return false;
@@ -308,6 +309,8 @@ bool DrawingBuffer::FinishPrepareTextureMailboxSoftware(
WebGLImageConversion::AlphaOp op =
need_premultiply ? WebGLImageConversion::kAlphaDoPremultiply
: WebGLImageConversion::kAlphaDoNothing;
+ state_restorer_->SetFramebufferBindingDirty();
+ gl_->BindFramebuffer(GL_FRAMEBUFFER, fbo_);
ReadBackFramebuffer(pixels, Size().Width(), Size().Height(), kReadbackSkia,
op);
}

Powered by Google App Engine
This is Rietveld 408576698