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

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: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 070cb6d56d319404d205b392a0750df0e855044a..8d4bf5a1df9e6489ae20f5d75e35990e78b26b1d 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -299,6 +299,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;
@@ -311,6 +312,8 @@ bool DrawingBuffer::FinishPrepareTextureMailboxSoftware(
WebGLImageConversion::AlphaOp op =
need_premultiply ? WebGLImageConversion::kAlphaDoPremultiply
: WebGLImageConversion::kAlphaDoNothing;
xinghua.cao 2017/05/24 11:24:39 Here may be binding framebuffer on multisample_fbo
+ state_restorer_->SetFramebufferBindingDirty();
+ gl_->BindFramebuffer(GL_FRAMEBUFFER, fbo_);
ReadBackFramebuffer(pixels, Size().Width(), Size().Height(), kReadbackSkia,
Zhenyao Mo 2017/05/24 20:31:01 I think BindFramebuffer(_, fbo_) should be part of
Ken Russell (switch to Gerrit) 2017/05/24 20:40:04 Looking at the code, I'm not sure it can be. Drawi
Zhenyao Mo 2017/05/24 20:53:30 kbr is right. Sorry about the noise. The code is f
xinghua.cao 2017/05/25 10:43:17 Hi, all, I am confused how to design the test case
Zhenyao Mo 2017/05/25 18:03:00 May check gl errors after PrepareTextureMailbox()
xinghua.cao 2017/05/26 15:26:23 I think it is more suitable to check the fbo bindi
op);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698