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

Unified Diff: ui/gfx/ozone/surface_ozone_canvas.h

Issue 249413003: ozone: dri: Composite to intermediate surface & copy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: split drisurfaceadapter definitions Created 6 years, 8 months 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/gfx/ozone/impl/file_surface_factory.cc ('k') | ui/ozone/platform/caca/caca_surface_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/ozone/surface_ozone_canvas.h
diff --git a/ui/gfx/ozone/surface_ozone_canvas.h b/ui/gfx/ozone/surface_ozone_canvas.h
index 7b09b230bfa5db640c2662e780648320c6e50d05..efedf905d33597fd8822cb0cb1027635174e441b 100644
--- a/ui/gfx/ozone/surface_ozone_canvas.h
+++ b/ui/gfx/ozone/surface_ozone_canvas.h
@@ -28,15 +28,18 @@ class GFX_EXPORT SurfaceOzoneCanvas {
// Returns an SkCanvas for drawing on the window.
virtual skia::RefPtr<SkCanvas> GetCanvas() = 0;
- // Attempts to resize the canvas to match the viewport size. Returns true if
- // resizing was successful, otherwise false (platforms may require a fixed
- // size canvas). After resizing, the compositor must call GetCanvas() to get
- // the next canvas.
- virtual bool ResizeCanvas(const gfx::Size& viewport_size) = 0;
-
- // Present the current canvas. After presenting, the compositor must call
- // GetCanvas() to get the next canvas.
- virtual bool PresentCanvas() = 0;
+ // Attempts to resize the canvas to match the viewport size. After
+ // resizing, the compositor must call GetCanvas() to get the next
+ // canvas - this invalidates any previous canvas from GetCanvas().
+ virtual void ResizeCanvas(const gfx::Size& viewport_size) = 0;
+
+ // Present the current canvas. After presenting, the compositor must
+ // call GetCanvas() to get the next canvas - this invalidates any
+ // previous canvas from GetCanvas().
+ //
+ // The implementation may assume that any pixels outside the damage
+ // rectangle are unchanged since the previous call to PresentCanvas().
+ virtual void PresentCanvas(const gfx::Rect& damage) = 0;
// Returns a gfx::VsyncProvider for this surface. Note that this may be
// called after we have entered the sandbox so if there are operations (e.g.
« no previous file with comments | « ui/gfx/ozone/impl/file_surface_factory.cc ('k') | ui/ozone/platform/caca/caca_surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698