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

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: Fix test compilation 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 5ed30782a099a425ab218d220a521cf1f5107929..5634b9c2e1bc3225848792998b02819f120a39f5 100644
--- a/ui/gfx/surface/accelerated_surface_win.h
+++ b/ui/gfx/surface/accelerated_surface_win.h
@@ -7,6 +7,7 @@
#pragma once
#include <d3d9.h>
+#include <vector>
#include "base/callback_forward.h"
#include "base/memory/ref_counted.h"
@@ -28,6 +29,7 @@ class AcceleratedPresenter : public base::RefCounted<AcceleratedPresenter> {
int64 surface_id,
const base::Closure& completion_task);
bool Present(gfx::NativeWindow window);
+ bool CopyTo(const gfx::Size& size, std::vector<unsigned char>* buf);
void Suspend();
void WaitForPendingTasks();
@@ -79,6 +81,10 @@ class SURFACE_EXPORT AcceleratedSurface {
// Synchronously present a frame with no acknowledgement.
bool Present(HWND window);
+ // Copies the surface data to |buf|. The image data is transformed so that it
+ // fits in |size|.
+ bool CopyTo(const gfx::Size& size, std::vector<unsigned char>* 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