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

Unified Diff: ui/gl/gl_surface.h

Issue 1513283002: Add support to send optimal format as part of ScheduleOverlayPlane (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update cmd_buffer_functions Created 5 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
« no previous file with comments | « ui/gl/gl_image_surface_texture.cc ('k') | ui/gl/gl_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(); }
« no previous file with comments | « ui/gl/gl_image_surface_texture.cc ('k') | ui/gl/gl_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698