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

Unified Diff: cc/resources/resource_provider.h

Issue 21159007: cc: Adding support for RGBA_4444 tile textures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review comments Created 7 years, 3 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
Index: cc/resources/resource_provider.h
diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h
index 412c92b377ba27815d68bef2d9235288e5633d36..83c3a76863993f7469a4f2681796c0e73e5e8ea3 100644
--- a/cc/resources/resource_provider.h
+++ b/cc/resources/resource_provider.h
@@ -52,9 +52,14 @@ class CC_EXPORT ResourceProvider {
GLTexture = 1,
Bitmap,
};
+ enum TextureType {
epennerAtGoogle 2013/09/06 03:24:44 I'm interested in what others think here, but I wa
reveman 2013/09/06 03:47:15 Maybe OK to just use the internal formats defined
+ RGBA_8888,
+ RGBA_4444,
epennerAtGoogle 2013/09/06 03:24:44 Do we need BGRA_8888 also? The idea to use this en
+ };
static scoped_ptr<ResourceProvider> Create(OutputSurface* output_surface,
- int highp_threshold_min);
+ int highp_threshold_min,
+ bool use_rgba_4444_textures);
epennerAtGoogle 2013/09/06 03:24:44 How about TextureType best_texture_type, and no bo
virtual ~ResourceProvider();
@@ -65,6 +70,7 @@ class CC_EXPORT ResourceProvider {
int max_texture_size() const { return max_texture_size_; }
GLenum best_texture_format() const { return best_texture_format_; }
epennerAtGoogle 2013/09/06 03:24:44 I was hoping we could get rid of the GLenum comple
+ TextureType best_texture_type() const { return best_texture_type_; }
size_t num_resources() const { return resources_.size(); }
// Checks whether a resource is in use by a consumer.
@@ -381,8 +387,9 @@ class CC_EXPORT ResourceProvider {
resource->read_lock_fence->HasPassed();
}
- explicit ResourceProvider(OutputSurface* output_surface,
- int highp_threshold_min);
+ ResourceProvider(OutputSurface* output_surface,
+ int highp_threshold_min,
+ bool use_rgba_4444_textures);
void CleanUpGLIfNeeded();
@@ -434,6 +441,7 @@ class CC_EXPORT ResourceProvider {
scoped_ptr<TextureUploader> texture_uploader_;
int max_texture_size_;
GLenum best_texture_format_;
+ TextureType best_texture_type_;
base::ThreadChecker thread_checker_;

Powered by Google App Engine
This is Rietveld 408576698