Index: cc/resources/resource_provider_unittest.cc |
diff --git a/cc/resources/resource_provider_unittest.cc b/cc/resources/resource_provider_unittest.cc |
index e507ad67a93558d64c805a6edc69db2be348791a..0a358d165798db31c0dfd9b55b0dcb46dbfeb4c3 100644 |
--- a/cc/resources/resource_provider_unittest.cc |
+++ b/cc/resources/resource_provider_unittest.cc |
@@ -2648,6 +2648,7 @@ TEST_P(ResourceProviderTest, TextureMailbox_GLTexture2D) { |
&main_thread_task_runner)); |
TextureMailbox mailbox(gpu_mailbox, target, sync_point); |
+ mailbox.set_nearest_neighbor(true); |
ResourceProvider::ResourceId id = |
resource_provider->CreateResourceFromTextureMailbox( |
@@ -2663,13 +2664,21 @@ TEST_P(ResourceProviderTest, TextureMailbox_GLTexture2D) { |
Mock::VerifyAndClearExpectations(context); |
// Using the texture does a consume of the mailbox. |
- EXPECT_CALL(*context, bindTexture(target, texture_id)); |
+ EXPECT_CALL(*context, bindTexture(target, texture_id)).Times(2); |
EXPECT_CALL(*context, consumeTextureCHROMIUM(target, _)); |
EXPECT_CALL(*context, insertSyncPoint()).Times(0); |
EXPECT_CALL(*context, produceTextureCHROMIUM(_, _)).Times(0); |
- ResourceProvider::ScopedReadLockGL lock(resource_provider.get(), id); |
+ // The sampler will reset these because |nearest_neighbor| was set on the |
danakj
2014/11/17 17:39:41
It would be nice to test 2 TextureMailboxes, one w
jackhou1
2014/11/17 22:46:35
Refactored this test in a similar way to ResourceP
|
+ // mailbox. |
+ EXPECT_CALL(*context, |
+ texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR)); |
+ EXPECT_CALL(*context, |
+ texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)); |
+ |
+ ResourceProvider::ScopedSamplerGL lock( |
+ resource_provider.get(), id, GL_LINEAR); |
Mock::VerifyAndClearExpectations(context); |
// When done with it, a sync point should be inserted, but no produce is |