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

Unified Diff: gpu/command_buffer/service/context_group_unittest.cc

Issue 224763002: Remove default textures in (!bind_generates_resource) context groups. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
Index: gpu/command_buffer/service/context_group_unittest.cc
diff --git a/gpu/command_buffer/service/context_group_unittest.cc b/gpu/command_buffer/service/context_group_unittest.cc
index c77ea9083c525c65752582e57334188679fa4110..b503c64b7a9d1304c15d4353299bb2613f898e9b 100644
--- a/gpu/command_buffer/service/context_group_unittest.cc
+++ b/gpu/command_buffer/service/context_group_unittest.cc
@@ -30,16 +30,15 @@ namespace gles2 {
class ContextGroupTest : public testing::Test {
public:
- ContextGroupTest() {
- }
+ ContextGroupTest() : bind_generates_resource_(false) {}
protected:
virtual void SetUp() {
gl_.reset(new ::testing::StrictMock< ::gfx::MockGLInterface>());
::gfx::MockGLInterface::SetGLInterface(gl_.get());
decoder_.reset(new MockGLES2Decoder());
- group_ = scoped_refptr<ContextGroup>(
- new ContextGroup(NULL, NULL, NULL, NULL, NULL, true));
+ group_ = scoped_refptr<ContextGroup>(new ContextGroup(
+ NULL, NULL, NULL, NULL, NULL, bind_generates_resource_));
}
virtual void TearDown() {
@@ -50,6 +49,7 @@ class ContextGroupTest : public testing::Test {
scoped_ptr< ::testing::StrictMock< ::gfx::MockGLInterface> > gl_;
scoped_ptr<MockGLES2Decoder> decoder_;
scoped_refptr<ContextGroup> group_;
+ bool bind_generates_resource_;
piman 2014/04/04 02:50:28 is anything setting this to a non-default value?
vmiura 2014/04/04 18:32:57 Changed to kUseDefaultTextures.
piman 2014/04/04 22:47:44 I think you missed this file.
vmiura 2014/04/05 01:54:29 Done. Changed to kBindGeneratesResource.
};
TEST_F(ContextGroupTest, Basic) {
@@ -70,8 +70,8 @@ TEST_F(ContextGroupTest, Basic) {
}
TEST_F(ContextGroupTest, InitializeNoExtensions) {
- TestHelper::SetupContextGroupInitExpectations(gl_.get(),
- DisallowedFeatures(), "", "");
+ TestHelper::SetupContextGroupInitExpectations(
+ gl_.get(), DisallowedFeatures(), "", "", bind_generates_resource_);
group_->Initialize(decoder_.get(), DisallowedFeatures());
EXPECT_EQ(static_cast<uint32>(TestHelper::kNumVertexAttribs),
group_->max_vertex_attribs());
@@ -105,8 +105,8 @@ TEST_F(ContextGroupTest, InitializeNoExtensions) {
TEST_F(ContextGroupTest, MultipleContexts) {
scoped_ptr<MockGLES2Decoder> decoder2_(new MockGLES2Decoder());
- TestHelper::SetupContextGroupInitExpectations(gl_.get(),
- DisallowedFeatures(), "", "");
+ TestHelper::SetupContextGroupInitExpectations(
+ gl_.get(), DisallowedFeatures(), "", "", bind_generates_resource_);
group_->Initialize(decoder_.get(), DisallowedFeatures());
group_->Initialize(decoder2_.get(), DisallowedFeatures());

Powered by Google App Engine
This is Rietveld 408576698