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

Unified Diff: gpu/command_buffer/tests/gl_readback_unittest.cc

Issue 2550583002: gpu: Thread-safe command buffer state lookup. (Closed)
Patch Set: jbauman's review Created 4 years 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 | « gpu/command_buffer/tests/gl_manager.cc ('k') | gpu/gles2_conform_support/egl/context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/tests/gl_readback_unittest.cc
diff --git a/gpu/command_buffer/tests/gl_readback_unittest.cc b/gpu/command_buffer/tests/gl_readback_unittest.cc
index 0d9e48260f98039da080dbe48f77703e26749fd6..6b7222ee2d68b653fd9c6f8d85a75176cb81f541 100644
--- a/gpu/command_buffer/tests/gl_readback_unittest.cc
+++ b/gpu/command_buffer/tests/gl_readback_unittest.cc
@@ -30,14 +30,16 @@ class GLReadbackTest : public testing::Test {
void TearDown() override { gl_.Destroy(); }
- static void WaitForQueryCallback(int q, base::Closure cb) {
+ void WaitForQueryCallback(int q, base::Closure cb) {
unsigned int done = 0;
+ gl_.PerformIdleWork();
glGetQueryObjectuivEXT(q, GL_QUERY_RESULT_AVAILABLE_EXT, &done);
if (done) {
cb.Run();
} else {
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
- FROM_HERE, base::Bind(&WaitForQueryCallback, q, cb),
+ FROM_HERE, base::Bind(&GLReadbackTest::WaitForQueryCallback,
+ base::Unretained(this), q, cb),
base::TimeDelta::FromMilliseconds(3));
}
}
@@ -51,7 +53,6 @@ class GLReadbackTest : public testing::Test {
GLManager gl_;
};
-
TEST_F(GLReadbackTest, ReadPixelsWithPBOAndQuery) {
const GLint kBytesPerPixel = 4;
const GLint kWidth = 2;
« no previous file with comments | « gpu/command_buffer/tests/gl_manager.cc ('k') | gpu/gles2_conform_support/egl/context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698