Index: ui/gl/gl_surface.h |
diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h |
index 1f4bfbba4ed9890b5b775fadcf801884990892b9..0dfe25493bba736cbfaeb5009aa784f831dac72f 100644 |
--- a/ui/gl/gl_surface.h |
+++ b/ui/gl/gl_surface.h |
@@ -10,6 +10,7 @@ |
#include "base/callback.h" |
#include "base/memory/ref_counted.h" |
#include "build/build_config.h" |
+#include "ui/gfx/buffer_types.h" |
#include "ui/gfx/geometry/rect.h" |
#include "ui/gfx/geometry/rect_f.h" |
#include "ui/gfx/geometry/size.h" |
@@ -154,15 +155,24 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> { |
// main framebuffer, overlays may be scheduled at 0, taking its place. |
// |transform| specifies how the buffer is to be transformed during |
// composition. |
+ // |storage_format| gives a hint about the optimal storage format supported |
+ // by the platform for this overlay plane. This can be used to process native |
+ // pixmap and store pixel data in that format before scheduling the overlay |
+ // plane. |
// |image| to be presented by the overlay. |
// |bounds_rect| specify where it is supposed to be on the screen in pixels. |
// |crop_rect| specifies the region within the buffer to be placed inside |
// |bounds_rect|. |
+ // |handle_scaling| hints if surface needs to handle any required scaling |
+ // before scheduling the plane. The value is set to true if scaling needs to |
+ // be handled by the surface. |
virtual bool ScheduleOverlayPlane(int z_order, |
OverlayTransform transform, |
+ gfx::BufferFormat storage_format, |
gl::GLImage* image, |
const Rect& bounds_rect, |
- const RectF& crop_rect); |
+ const RectF& crop_rect, |
+ bool handle_scaling); |
// Schedule a CALayer to be shown at swap time. |
// All arguments correspond to their CALayer properties. |
@@ -255,9 +265,11 @@ class GL_EXPORT GLSurfaceAdapter : public GLSurface { |
VSyncProvider* GetVSyncProvider() override; |
bool ScheduleOverlayPlane(int z_order, |
OverlayTransform transform, |
+ gfx::BufferFormat storage_format, |
gl::GLImage* image, |
const Rect& bounds_rect, |
- const RectF& crop_rect) override; |
+ const RectF& crop_rect, |
+ bool handle_scaling) override; |
bool IsSurfaceless() const override; |
GLSurface* surface() const { return surface_.get(); } |