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

Unified Diff: content/common/gpu/client/gl_helper.h

Issue 88033002: Add RGB565 Texture readback support in gl_helper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Modified code as per the review comments. Created 7 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/gl_helper.h
diff --git a/content/common/gpu/client/gl_helper.h b/content/common/gpu/client/gl_helper.h
index bac0560651b048f6a8b819a781ecf02f5c9eda04..8f96ff7b342486fdb708d51b9bf3d8a14f6e5270 100644
--- a/content/common/gpu/client/gl_helper.h
+++ b/content/common/gpu/client/gl_helper.h
@@ -214,7 +214,6 @@ class CONTENT_EXPORT GLHelper {
SCALER_QUALITY_BEST = 3,
};
-
// Copies the block of pixels specified with |src_subrect| from |src_texture|,
// scales it to |dst_size|, and writes it into |out|.
// |src_size| is the size of |src_texture|. The result is of format GL_BGRA
@@ -229,6 +228,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|,
@@ -247,6 +247,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
@@ -318,6 +319,9 @@ class CONTENT_EXPORT GLHelper {
// size of the framebuffer.
void CopyTextureFullImage(blink::WebGLId 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

Powered by Google App Engine
This is Rietveld 408576698