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

Unified Diff: ui/gfx/surface/accelerated_surface_win.h

Issue 9582003: Support browser side thumbnailing for GPU composited pages on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge CopyFromCompoitingSurface into CopyFromBackingStore Created 8 years, 9 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
Index: ui/gfx/surface/accelerated_surface_win.h
diff --git a/ui/gfx/surface/accelerated_surface_win.h b/ui/gfx/surface/accelerated_surface_win.h
index d027f19b548a76763c8c00816e48bf22ef479a36..4a752594cec6c38a440996686c0f4964ca6671b9 100644
--- a/ui/gfx/surface/accelerated_surface_win.h
+++ b/ui/gfx/surface/accelerated_surface_win.h
@@ -32,6 +32,7 @@ class AcceleratedPresenter
int64 surface_id,
const base::Callback<void(bool)>& completion_task);
bool Present(gfx::NativeWindow window);
+ bool CopyTo(const gfx::Size& size, void* buf);
void Suspend();
void WaitForPendingTasks();
@@ -85,6 +86,12 @@ class SURFACE_EXPORT AcceleratedSurface {
// Synchronously present a frame with no acknowledgement.
bool Present(gfx::NativeWindow window);
+ // Copies the surface data to |buf|. The image data is transformed so that it
+ // fits in |size|.
+ // Caller must ensure that |buf| is allocated with the size no less than
+ // |4 * size.width() * size.height()| bytes.
+ bool CopyTo(const gfx::Size& size, void* buf);
+
// Temporarily release resources until a new surface is asynchronously
// presented. Present will not be able to represent the last surface after
// calling this and will return false.

Powered by Google App Engine
This is Rietveld 408576698