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

Unified Diff: ui/surface/accelerated_surface_win.h

Issue 10829054: Support copying a partial rectangle region from the compositing surface on Win. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comment Created 8 years, 5 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 | « content/browser/renderer_host/render_widget_host_view_win.cc ('k') | ui/surface/accelerated_surface_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/surface/accelerated_surface_win.h
diff --git a/ui/surface/accelerated_surface_win.h b/ui/surface/accelerated_surface_win.h
index 2abf0cedc8502d133663054de56b10eccf82f79f..ca465230b22bc7f086aee4d1e2ce219d8095fbf1 100644
--- a/ui/surface/accelerated_surface_win.h
+++ b/ui/surface/accelerated_surface_win.h
@@ -18,6 +18,10 @@
class PresentThread;
+namespace gfx {
+class Rect;
+}
+
class SURFACE_EXPORT AcceleratedPresenter
: public base::RefCountedThreadSafe<AcceleratedPresenter> {
public:
@@ -52,7 +56,9 @@ class SURFACE_EXPORT AcceleratedPresenter
// The public member functions are called on the main thread.
bool Present(HDC dc);
- bool CopyTo(const gfx::Size& size, void* buf);
+ bool CopyTo(const gfx::Rect& src_subrect,
+ const gfx::Size& dst_size,
+ void* buf);
void Invalidate();
private:
@@ -115,11 +121,14 @@ class SURFACE_EXPORT AcceleratedSurface {
// Synchronously present a frame with no acknowledgement.
bool Present(HDC dc);
- // Copies the surface data to |buf|. The image data is transformed so that it
- // fits in |size|.
+ // Copies the surface data to |buf|. The copied region is specified with
+ // |src_subrect| and the image data is transformed so that it fits in
+ // |dst_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);
+ // |4 * dst_size.width() * dst_size.height()| bytes.
+ bool CopyTo(const gfx::Rect& src_subrect,
+ const gfx::Size& dst_size,
+ void* buf);
// Temporarily release resources until a new surface is asynchronously
// presented. Present will not be able to represent the last surface after
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_win.cc ('k') | ui/surface/accelerated_surface_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698