diff options
author | miu@chromium.org <miu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-14 10:03:08 +0000 |
---|---|---|
committer | miu@chromium.org <miu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-14 10:04:04 +0000 |
commit | 667568d3ec75b491e167473ab1b7c57d1dc08e19 (patch) | |
tree | b339f6a16b115f50c29fe3e356a7a3a8b6d779cd /ui/snapshot | |
parent | 183e1b954226fb4842d8cc5a685845459d11fe3b (diff) | |
download | chromium_src-667568d3ec75b491e167473ab1b7c57d1dc08e19.zip chromium_src-667568d3ec75b491e167473ab1b7c57d1dc08e19.tar.gz chromium_src-667568d3ec75b491e167473ab1b7c57d1dc08e19.tar.bz2 |
Fix set_area sizes for RequestCopyOfOutput, and related tests.
NOTE: This is a revival/continuation of https://codereview.chromium.org/333723004, which was started by another developer.
The cc:CopyOutputRequest object assumes the src_subrect region is
in DIP space. Thus, all calling code should provide the same.
Fixed tests in render_widget_host_view_browsertest.cc that were
completing successfully, even though the implementation was broken
for the high DPI scenarios.
In addition, I updated a number of interface comments to clarify the
difference between src_subrect being in DIP coordinates versus the
dest_size being in physical pixel coordinates.
Dependent on: https://codereview.chromium.org/311253004 (landed at r276139)
BUG=397708,399349
Review URL: https://codereview.chromium.org/462173002
Cr-Commit-Position: refs/heads/master@{#289509}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289509 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/snapshot')
-rw-r--r-- | ui/snapshot/snapshot.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/snapshot/snapshot.h b/ui/snapshot/snapshot.h index e547e47..4b2733c 100644 --- a/ui/snapshot/snapshot.h +++ b/ui/snapshot/snapshot.h @@ -41,10 +41,12 @@ SNAPSHOT_EXPORT bool GrabViewSnapshot( std::vector<unsigned char>* png_representation, const gfx::Rect& snapshot_bounds); + +// These functions take a snapshot of |source_rect|, specified in layer space +// coordinates (DIP for desktop, physical pixels for Android), and scale the +// snapshot to |target_size| (in physical pixels), asynchronously. typedef base::Callback<void(const gfx::Image& snapshot)> GrabWindowSnapshotAsyncCallback; -// GrabWindowSnapshotAndScaleAsync() copies snapshot of |source_rect| from -// window and scales it to |target_size| asynchronously. SNAPSHOT_EXPORT void GrabWindowSnapshotAndScaleAsync( gfx::NativeWindow window, const gfx::Rect& source_rect, |