Index: content/common/gpu/client/gl_helper.h |
diff --git a/content/common/gpu/client/gl_helper.h b/content/common/gpu/client/gl_helper.h |
index 46db753207217ae13659920803008f68b739df8c..38618c0494b03bdf7eaf93992a313b2b4783d84c 100644 |
--- a/content/common/gpu/client/gl_helper.h |
+++ b/content/common/gpu/client/gl_helper.h |
@@ -5,6 +5,8 @@ |
#ifndef CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ |
#define CONTENT_COMMON_GPU_CLIENT_GL_HELPER_H_ |
+#include <map> |
+ |
#include "base/atomicops.h" |
#include "base/basictypes.h" |
#include "base/callback.h" |
@@ -277,8 +279,12 @@ class CONTENT_EXPORT GLHelper { |
// size of the framebuffer. |
void CopyTextureFullImage(GLuint texture, const gfx::Size& size); |
- // Check whether rgb565 readback is supported or not. |
- bool CanUseRgb565Readback(); |
+ // Helper functions for checking the supported texture formats. |
+ bool SupportsFormat(GLint format, GLint type); |
no sievers
2014/02/18 19:35:44
nit: can be private
sivag
2014/02/19 15:49:04
Done.
|
+ |
+ // Checks whether the readback using passed texture format |
+ // is supported or not. |
+ bool IsReadBackConfigSupported(const SkBitmap::Config& texture_format); |
no sievers
2014/02/18 19:35:44
Please describe that this does not specify whether
sivag
2014/02/19 15:49:04
The reason why i kept a SkBitmap::Config is in Co
|
// A scaler will cache all intermediate textures and programs |
// needed to scale from a specified size to a destination size. |
@@ -340,8 +346,7 @@ class CONTENT_EXPORT GLHelper { |
gpu::ContextSupport* context_support_; |
scoped_ptr<CopyTextureToImpl> copy_texture_to_impl_; |
scoped_ptr<GLHelperScaling> scaler_impl_; |
- bool initialized_565_format_check_; |
- bool support_565_format_; |
+ std::map<SkBitmap::Config, bool> config_map_; |
piman
2014/02/18 22:23:15
map is way overkill.
SkBitmap::Config is a finite
sivag
2014/02/19 15:49:04
Done.
|
DISALLOW_COPY_AND_ASSIGN(GLHelper); |
}; |