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

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

Issue 1068663002: gpu: More specific internalformat requirements for CreateImageCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/image_factory.cc ('k') | ui/gl/gl_image_memory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc
diff --git a/gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc b/gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc
index cfd539a8ced74dde67876f2156f1f92643d1eec5..b279e26016dcb854614b6907e6fc9c80c03e3a9a 100644
--- a/gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc
+++ b/gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc
@@ -126,7 +126,7 @@ std::vector<uint8> GetFramebufferPixel(
return std::vector<uint8>();
}
-GLenum TextureFormat(gfx::GpuMemoryBuffer::Format format) {
+GLenum InternalFormat(gfx::GpuMemoryBuffer::Format format) {
switch (format) {
case gfx::GpuMemoryBuffer::RGBA_8888:
return GL_RGBA;
@@ -177,8 +177,9 @@ TEST_P(GpuMemoryBufferTest, Lifecycle) {
buffer->Unmap();
// Create the image. This should add the image ID to the ImageManager.
- GLuint image_id = glCreateImageCHROMIUM(
- buffer->AsClientBuffer(), kImageWidth, kImageHeight, GL_RGBA);
+ GLuint image_id =
+ glCreateImageCHROMIUM(buffer->AsClientBuffer(), kImageWidth, kImageHeight,
+ InternalFormat(GetParam()));
EXPECT_NE(0u, image_id);
EXPECT_TRUE(gl_.decoder()->GetImageManager()->LookupImage(image_id) != NULL);
@@ -188,7 +189,7 @@ TEST_P(GpuMemoryBufferTest, Lifecycle) {
// Copy texture so we can verify result using CheckPixels.
glCopyTextureCHROMIUM(GL_TEXTURE_2D, texture_ids_[0], texture_ids_[1],
- TextureFormat(GetParam()), GL_UNSIGNED_BYTE);
+ InternalFormat(GetParam()), GL_UNSIGNED_BYTE);
EXPECT_TRUE(glGetError() == GL_NO_ERROR);
// Check if pixels match the values that were assigned to the mapped buffer.
« no previous file with comments | « gpu/command_buffer/service/image_factory.cc ('k') | ui/gl/gl_image_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698