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. |