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

Unified Diff: cc/resources/resource_provider.cc

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.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
« no previous file with comments | « cc/resources/resource_provider.h ('k') | cc/resources/shared_bitmap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_provider.cc
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc
index 636e797900b85e7386efbd3e558e87f6fe09869a..fe7cc003ddf1c76bc5dc56849122e2e27e07bcdb 100644
--- a/cc/resources/resource_provider.cc
+++ b/cc/resources/resource_provider.cc
@@ -76,6 +76,7 @@ GLenum TextureToStorageFormat(ResourceFormat format) {
case LUMINANCE_8:
case RGB_565:
case ETC1:
+ case RED_8:
NOTREACHED();
break;
}
@@ -94,6 +95,7 @@ bool IsFormatSupportedForStorage(ResourceFormat format, bool use_bgra) {
case LUMINANCE_8:
case RGB_565:
case ETC1:
+ case RED_8:
return false;
}
return false;
@@ -125,6 +127,7 @@ gfx::GpuMemoryBuffer::Format ToGpuMemoryBufferFormat(ResourceFormat format) {
case LUMINANCE_8:
case RGB_565:
case ETC1:
+ case RED_8:
break;
}
NOTREACHED();
@@ -1216,6 +1219,7 @@ ResourceProvider::ResourceProvider(
use_texture_format_bgra_(false),
use_texture_usage_hint_(false),
use_compressed_texture_etc1_(false),
+ yuv_resource_format_(LUMINANCE_8),
max_texture_size_(0),
best_texture_format_(RGBA_8888),
use_rgba_4444_texture_format_(use_rgba_4444_texture_format),
@@ -1254,6 +1258,7 @@ void ResourceProvider::InitializeGL() {
use_texture_format_bgra_ = caps.gpu.texture_format_bgra8888;
use_texture_usage_hint_ = caps.gpu.texture_usage;
use_compressed_texture_etc1_ = caps.gpu.texture_format_etc1;
+ yuv_resource_format_ = caps.gpu.texture_rg ? RED_8 : LUMINANCE_8;
use_sync_query_ = caps.gpu.sync_query;
GLES2Interface* gl = ContextGL();
« no previous file with comments | « cc/resources/resource_provider.h ('k') | cc/resources/shared_bitmap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698