diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-15 19:36:36 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-15 19:36:36 +0000 |
commit | 2e6f39e1739c4e408a6f635e31678376187c232e (patch) | |
tree | 96869e634bb6d0c521579bb82927a6d45de48405 /cc | |
parent | c276c7a47a7777522eac0d2675d8cba3d32e56dd (diff) | |
download | chromium_src-2e6f39e1739c4e408a6f635e31678376187c232e.zip chromium_src-2e6f39e1739c4e408a6f635e31678376187c232e.tar.gz chromium_src-2e6f39e1739c4e408a6f635e31678376187c232e.tar.bz2 |
Make ui::Snapshot asynchronous on Android, remove CompositeAndReadback.
The android pixel tests use the ui::Snapshot code to get a pixel copy
of the content_shell's output. Make this behaviour match the aura
implementation of ui::Snapshot by returning false in the synchronous
verion, causing callsites to fall back to the async one.
This implements the async snapshots by moving the aura implementation
out into snapshot_async.cc and reusing that code (with one #if for
RGBA vs BGRA ordering).
After this, the pixel tests get a bitmap from cc instead of creating
their own bitmap. The result is that the bitmap has a slightly
different size (384x528) which is the size of the root layer. The
pixel tests were previously trying to crop to 400x300, which is
outside the bounds of this bitmap, so change them to crop to 300x300
instead, and increment their versions to pick up the new pngs.
BUG=252046, 371592
Review URL: https://codereview.chromium.org/281003002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270778 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r-- | cc/output/copy_output_request.cc | 1 | ||||
-rw-r--r-- | cc/output/copy_output_request.h | 2 | ||||
-rw-r--r-- | cc/output/copy_output_result.cc | 1 | ||||
-rw-r--r-- | cc/output/copy_output_result.h | 2 |
4 files changed, 2 insertions, 4 deletions
diff --git a/cc/output/copy_output_request.cc b/cc/output/copy_output_request.cc index 0e84011..2d42fa9 100644 --- a/cc/output/copy_output_request.cc +++ b/cc/output/copy_output_request.cc @@ -9,7 +9,6 @@ #include "base/debug/trace_event.h" #include "base/logging.h" #include "cc/output/copy_output_result.h" -#include "cc/resources/single_release_callback.h" #include "cc/resources/texture_mailbox.h" #include "third_party/skia/include/core/SkBitmap.h" diff --git a/cc/output/copy_output_request.h b/cc/output/copy_output_request.h index dcb2fe2..60a5f11 100644 --- a/cc/output/copy_output_request.h +++ b/cc/output/copy_output_request.h @@ -8,6 +8,7 @@ #include "base/callback.h" #include "base/memory/scoped_ptr.h" #include "cc/base/cc_export.h" +#include "cc/resources/single_release_callback.h" #include "cc/resources/texture_mailbox.h" #include "ui/gfx/rect.h" @@ -15,7 +16,6 @@ class SkBitmap; namespace cc { class CopyOutputResult; -class SingleReleaseCallback; class CC_EXPORT CopyOutputRequest { public: diff --git a/cc/output/copy_output_result.cc b/cc/output/copy_output_result.cc index adbb8de..8dee046 100644 --- a/cc/output/copy_output_result.cc +++ b/cc/output/copy_output_result.cc @@ -5,7 +5,6 @@ #include "cc/output/copy_output_result.h" #include "base/logging.h" -#include "cc/resources/single_release_callback.h" #include "cc/resources/texture_mailbox.h" #include "third_party/skia/include/core/SkBitmap.h" diff --git a/cc/output/copy_output_result.h b/cc/output/copy_output_result.h index b4806581..8529e3f 100644 --- a/cc/output/copy_output_result.h +++ b/cc/output/copy_output_result.h @@ -7,13 +7,13 @@ #include "base/memory/scoped_ptr.h" #include "cc/base/cc_export.h" +#include "cc/resources/single_release_callback.h" #include "cc/resources/texture_mailbox.h" #include "ui/gfx/size.h" class SkBitmap; namespace cc { -class SingleReleaseCallback; class TextureMailbox; class CC_EXPORT CopyOutputResult { |