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

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

Issue 1248253003: Add better support for RGBA_4444 textures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and forward flags Created 5 years, 4 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 | « content/renderer/gpu/render_widget_compositor.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/image_factory.cc
diff --git a/gpu/command_buffer/service/image_factory.cc b/gpu/command_buffer/service/image_factory.cc
index a1a3f15a36ccf7801d933a2e799bc147ff66a538..eeecc167dbe4913bf76e12b8f53ea89da207d36d 100644
--- a/gpu/command_buffer/service/image_factory.cc
+++ b/gpu/command_buffer/service/image_factory.cc
@@ -63,7 +63,26 @@ gfx::BufferUsage ImageFactory::ImageUsageToGpuMemoryBufferUsage(
bool ImageFactory::IsImageFormatCompatibleWithGpuMemoryBufferFormat(
unsigned internalformat,
gfx::BufferFormat format) {
- return ImageFormatToGpuMemoryBufferFormat(internalformat) == format;
+ switch (format) {
+ case gfx::BufferFormat::ATC:
+ case gfx::BufferFormat::ATCIA:
+ case gfx::BufferFormat::BGRA_8888:
+ case gfx::BufferFormat::DXT1:
+ case gfx::BufferFormat::DXT5:
+ case gfx::BufferFormat::ETC1:
+ case gfx::BufferFormat::R_8:
+ case gfx::BufferFormat::RGBA_8888:
+ case gfx::BufferFormat::RGBX_8888:
+ case gfx::BufferFormat::YUV_420:
+ return ImageFormatToGpuMemoryBufferFormat(internalformat) == format;
+ case gfx::BufferFormat::RGBA_4444:
+ return internalformat == GL_RGBA;
+ case gfx::BufferFormat::YUV_420_BIPLANAR:
+ return false;
+ }
+
+ NOTREACHED();
+ return false;
}
// static
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698