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

Unified Diff: cc/test/pixel_test.cc

Issue 14273026: cc: Make async readback path use async glRreadPixels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: There, I fixed it Created 7 years, 8 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: cc/test/pixel_test.cc
diff --git a/cc/test/pixel_test.cc b/cc/test/pixel_test.cc
index 5976ae350db3ecc0af2c04beec660f975b531050..c645b0106f473b380ca46c89a0d61f4bcf589a99 100644
--- a/cc/test/pixel_test.cc
+++ b/cc/test/pixel_test.cc
@@ -4,6 +4,7 @@
#include "cc/test/pixel_test.h"
+#include "base/message_loop.h"
#include "base/path_service.h"
#include "cc/output/compositor_frame_metadata.h"
#include "cc/output/gl_renderer.h"
@@ -86,13 +87,16 @@ bool PixelTest::RunPixelTest(RenderPassList* pass_list,
renderer_->DecideRenderPassAllocationsForFrame(*pass_list);
renderer_->DrawFrame(pass_list);
- // TODO(danakj): When the glReadPixels is async, wait for it to finish.
+ // Wait for the readback to complete.
+ output_surface_->context3d()->finish();
+ base::MessageLoop::current()->Run();
piman 2013/04/27 00:42:25 Any way we can use base::RunLoop instead (generall
danakj 2013/04/29 14:59:05 I will introduce myself to RunLoop. (Oh, it is nee
return PixelsMatchReference(ref_file, comparator);
}
void PixelTest::ReadbackResult(scoped_ptr<SkBitmap> bitmap) {
result_bitmap_ = bitmap.Pass();
+ base::MessageLoop::current()->QuitWhenIdle();
}
bool PixelTest::PixelsMatchReference(const base::FilePath& ref_file,

Powered by Google App Engine
This is Rietveld 408576698