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

Unified Diff: trunk/src/gpu/command_buffer/service/mailbox_manager_unittest.cc

Issue 209853004: Revert 258122 "gpu: Allow fences to check whether a flush has oc..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 9 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 | trunk/src/gpu/command_buffer/service/mailbox_synchronizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/gpu/command_buffer/service/mailbox_manager_unittest.cc
===================================================================
--- trunk/src/gpu/command_buffer/service/mailbox_manager_unittest.cc (revision 258964)
+++ trunk/src/gpu/command_buffer/service/mailbox_manager_unittest.cc (working copy)
@@ -8,9 +8,7 @@
#include "gpu/command_buffer/service/mailbox_synchronizer.h"
#include "gpu/command_buffer/service/texture_manager.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/gl/gl_context_stub.h"
#include "ui/gl/gl_mock.h"
-#include "ui/gl/gl_surface_stub.h"
namespace gpu {
namespace gles2 {
@@ -190,9 +188,6 @@
manager2_ = new MailboxManager;
gl_.reset(new ::testing::StrictMock< ::gfx::MockGLInterface>());
::gfx::MockGLInterface::SetGLInterface(gl_.get());
- context_ = new gfx::GLContextStub();
- surface_ = new gfx::GLSurfaceStub();
- context_->MakeCurrent(surface_);
}
Texture* DefineTexture() {
@@ -254,15 +249,12 @@
virtual void TearDown() {
MailboxManagerTest::TearDown();
MailboxSynchronizer::Terminate();
- context_->ReleaseCurrent(NULL);
::gfx::MockGLInterface::SetGLInterface(NULL);
gl_.reset();
}
scoped_ptr< ::testing::StrictMock< ::gfx::MockGLInterface> > gl_;
scoped_refptr<MailboxManager> manager2_;
- scoped_refptr<gfx::GLContext> context_;
- scoped_refptr<gfx::GLSurface> surface_;
private:
DISALLOW_COPY_AND_ASSIGN(MailboxManagerSyncTest);
@@ -291,6 +283,7 @@
EXPECT_EQ(texture, manager_->ConsumeTexture(GL_TEXTURE_2D, name));
// Synchronize
+ EXPECT_CALL(*gl_, Flush()).Times(1);
manager_->PushTextureUpdates();
manager2_->PullTextureUpdates();
@@ -312,6 +305,7 @@
EXPECT_EQ(texture, manager_->ConsumeTexture(GL_TEXTURE_2D, name));
// Synchronize
+ EXPECT_CALL(*gl_, Flush()).Times(1);
manager_->PushTextureUpdates();
manager2_->PullTextureUpdates();
@@ -340,6 +334,7 @@
EXPECT_TRUE(texture->GetLevelImage(GL_TEXTURE_2D, 0) == NULL);
// Synchronize again
+ EXPECT_CALL(*gl_, Flush()).Times(1);
manager_->PushTextureUpdates();
SetupUpdateTexParamExpectations(
kNewTextureId, GL_LINEAR, GL_LINEAR, GL_REPEAT, GL_REPEAT);
@@ -401,6 +396,7 @@
manager2_->ProduceTexture(GL_TEXTURE_2D, name2, texture2);
// Make visible.
+ EXPECT_CALL(*gl_, Flush()).Times(2);
manager_->PushTextureUpdates();
manager2_->PushTextureUpdates();
@@ -439,6 +435,7 @@
Mock::VerifyAndClearExpectations(gl_.get());
// Synchronize in both directions
+ EXPECT_CALL(*gl_, Flush()).Times(2);
manager_->PushTextureUpdates();
manager2_->PushTextureUpdates();
// manager1 should see the change to texture2 mag_filter being applied.
« no previous file with comments | « no previous file | trunk/src/gpu/command_buffer/service/mailbox_synchronizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698