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 7b532685ebc5187c3372625e987e1184143f3a88..eaca6cf93d52c0d2c885dccdc23a211eca6535ad 100644 |
--- a/content/common/gpu/client/gl_helper.h |
+++ b/content/common/gpu/client/gl_helper.h |
@@ -12,6 +12,7 @@ |
#include "content/common/content_export.h" |
#include "gpu/command_buffer/client/gles2_interface.h" |
#include "gpu/command_buffer/common/mailbox_holder.h" |
+#include "third_party/skia/include/core/SkBitmap.h" |
namespace gfx { |
class Rect; |
@@ -182,6 +183,7 @@ class CONTENT_EXPORT GLHelper { |
const gfx::Rect& src_subrect, |
const gfx::Size& dst_size, |
unsigned char* out, |
+ bool readback_config_rgb565, |
const base::Callback<void(bool)>& callback); |
// Copies the block of pixels specified with |src_subrect| from |src_mailbox|, |
@@ -200,6 +202,7 @@ class CONTENT_EXPORT GLHelper { |
const gfx::Rect& src_subrect, |
const gfx::Size& dst_size, |
unsigned char* out, |
+ bool readback_config_rgb565, |
const base::Callback<void(bool)>& callback); |
// Copies the texture data out of |texture| into |out|. |size| is the |
@@ -209,7 +212,8 @@ class CONTENT_EXPORT GLHelper { |
// current OpenGL context. |
void ReadbackTextureSync(GLuint texture, |
const gfx::Rect& src_rect, |
- unsigned char* out); |
+ unsigned char* out, |
+ SkBitmap::Config format); |
// Creates a copy of the specified texture. |size| is the size of the texture. |
// Note that the src_texture will have the min/mag filter set to GL_LINEAR |
@@ -267,6 +271,9 @@ 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(); |
+ |
// A scaler will cache all intermediate textures and programs |
// needed to scale from a specified size to a destination size. |
// If the source or destination sizes changes, you must create |
@@ -327,6 +334,8 @@ 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_; |
DISALLOW_COPY_AND_ASSIGN(GLHelper); |
}; |