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

Unified Diff: content/common/gpu/client/gpu_memory_buffer_impl.cc

Issue 793693003: Tile Compression (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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: content/common/gpu/client/gpu_memory_buffer_impl.cc
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl.cc b/content/common/gpu/client/gpu_memory_buffer_impl.cc
index d3c08bdb1a09b0d1256c297148cd190d2fae5690..c3814291d7c839e0910f74dad8ad2e54519475a1 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl.cc
+++ b/content/common/gpu/client/gpu_memory_buffer_impl.cc
@@ -76,11 +76,18 @@ GpuMemoryBufferImpl* GpuMemoryBufferImpl::FromClientBuffer(
}
// static
-size_t GpuMemoryBufferImpl::BytesPerPixel(Format format) {
+size_t GpuMemoryBufferImpl::BitsPerPixel(Format format) {
switch (format) {
case RGBA_8888:
case RGBX_8888:
case BGRA_8888:
+ return 32;
+ case ATCIA:
+ case DXT5:
+ return 8;
+ case ATC:
+ case DXT1:
+ case ETC1:
return 4;
}
« no previous file with comments | « content/common/gpu/client/gpu_memory_buffer_impl.h ('k') | content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698