diff options
author | siva.gunturi <siva.gunturi@samsung.com> | 2015-05-08 04:49:54 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-08 11:50:23 +0000 |
commit | 49bc3a8c0fe5faaaa64bdb1d4743601e91691b2f (patch) | |
tree | 139af47a011c7560b0b02fe5f81d593ad62d4175 /content/test | |
parent | 1cc673925ed3465cf786688710d42b802b88b6e4 (diff) | |
download | chromium_src-49bc3a8c0fe5faaaa64bdb1d4743601e91691b2f.zip chromium_src-49bc3a8c0fe5faaaa64bdb1d4743601e91691b2f.tar.gz chromium_src-49bc3a8c0fe5faaaa64bdb1d4743601e91691b2f.tar.bz2 |
Maintain minimal error response.
1.FORMAT_SUPPORTED is no longer needed as we are falling back
to default RGBA_8888 format.
2.Renamed MEMORY_ALLOCATION_FAILURE to BITMAP_ALLOCATION_FAILURE
used it while returning response.
3.Remove READBACK_NOT_SUPPORTED, instead use READBACK_FAILURE.
4.This also simplifies the read back API by falling back to
returning RGBA bitmaps automatically if the format is not
supported. At the time of read back the preferred config will
be checked for read back support using isReadbackConfigSupported
and if its not supported by hardware then, RGBA_8 will be taken
as preferred format and a bitmap will be returned with that format.
The caller can always check whether they got the requested format
by checking the SkBitmap format type.
BUG=472457
Review URL: https://codereview.chromium.org/1113573002
Cr-Commit-Position: refs/heads/master@{#328945}
Diffstat (limited to 'content/test')
-rw-r--r-- | content/test/test_render_view_host.cc | 4 | ||||
-rw-r--r-- | content/test/test_render_view_host.h | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/content/test/test_render_view_host.cc b/content/test/test_render_view_host.cc index b6f7a86..f6521c9 100644 --- a/content/test/test_render_view_host.cc +++ b/content/test/test_render_view_host.cc @@ -124,8 +124,8 @@ void TestRenderWidgetHostView::CopyFromCompositingSurface( const gfx::Rect& src_subrect, const gfx::Size& dst_size, ReadbackRequestCallback& callback, - const SkColorType color_type) { - callback.Run(SkBitmap(), content::READBACK_NOT_SUPPORTED); + const SkColorType preferred_color_type) { + callback.Run(SkBitmap(), content::READBACK_FAILED); } void TestRenderWidgetHostView::CopyFromCompositingSurfaceToVideoFrame( diff --git a/content/test/test_render_view_host.h b/content/test/test_render_view_host.h index ad4ca65..6c0d889 100644 --- a/content/test/test_render_view_host.h +++ b/content/test/test_render_view_host.h @@ -111,10 +111,11 @@ class TestRenderWidgetHostView : public RenderWidgetHostViewBase { void SetTooltipText(const base::string16& tooltip_text) override {} void SelectionBoundsChanged( const ViewHostMsg_SelectionBounds_Params& params) override {} - void CopyFromCompositingSurface(const gfx::Rect& src_subrect, - const gfx::Size& dst_size, - ReadbackRequestCallback& callback, - const SkColorType color_type) override; + void CopyFromCompositingSurface( + const gfx::Rect& src_subrect, + const gfx::Size& dst_size, + ReadbackRequestCallback& callback, + const SkColorType preferred_color_type) override; void CopyFromCompositingSurfaceToVideoFrame( const gfx::Rect& src_subrect, const scoped_refptr<media::VideoFrame>& target, |