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

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

Issue 2424833003: gpu: check GL_RGB565 work in ES3 context (Closed)
Patch Set: Created 4 years, 2 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 | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/test_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/framebuffer_manager_unittest.cc
diff --git a/gpu/command_buffer/service/framebuffer_manager_unittest.cc b/gpu/command_buffer/service/framebuffer_manager_unittest.cc
index bb8e2fb2ca08d29a0ad7864115ea736c159ed324..5d47000102e5b6f76384fe34655f535e26b967a7 100644
--- a/gpu/command_buffer/service/framebuffer_manager_unittest.cc
+++ b/gpu/command_buffer/service/framebuffer_manager_unittest.cc
@@ -140,12 +140,16 @@ class FramebufferInfoTestBase : public GpuServiceTest {
context_type_ == CONTEXT_TYPE_OPENGLES3)
is_es3 = true;
InitializeContext(is_es3 ? "3.0" : "2.0", "GL_EXT_framebuffer_object");
+ if (is_es3) {
+ TestHelper::SetupFetureInfoEnableES3ValidatorsExpectations(gl_.get());
+ feature_info_->EnableES3ValidatorsForTesting();
+ }
}
void InitializeContext(const char* gl_version, const char* extensions) {
GpuServiceTest::SetUpWithGLVersion(gl_version, extensions);
- TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(gl_.get(),
- extensions, "", gl_version, context_type_);
+ TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
+ gl_.get(), extensions, "", gl_version, context_type_, false);
feature_info_->InitializeForTesting(context_type_);
decoder_.reset(new MockGLES2Decoder());
manager_.CreateFramebuffer(kClient1Id, kService1Id);
@@ -166,7 +170,7 @@ class FramebufferInfoTestBase : public GpuServiceTest {
class FramebufferInfoTest : public FramebufferInfoTestBase {
public:
- FramebufferInfoTest() : FramebufferInfoTestBase(CONTEXT_TYPE_OPENGLES2) {}
+ FramebufferInfoTest() : FramebufferInfoTestBase(CONTEXT_TYPE_OPENGLES3) {}
};
// GCC requires these declarations, but MSVC requires they not be present
@@ -494,7 +498,7 @@ TEST_F(FramebufferInfoTest, AttachTexture2D) {
const GLsizei kWidth3 = 75;
const GLsizei kHeight3 = 123;
const GLint kLevel3 = 0;
- const GLenum kFormat3 = GL_RGBA;
+ const GLenum kFormat3 = GL_RGB565;
const GLsizei kSamples3 = 0;
EXPECT_FALSE(framebuffer_->HasUnclearedAttachment(GL_COLOR_ATTACHMENT0));
EXPECT_FALSE(framebuffer_->HasUnclearedAttachment(GL_DEPTH_ATTACHMENT));
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/service/test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698