Issue 3998 in skia: Repeated SkCanvas::ReadPixels(const SkIRect&, SkBitmap*) fails for Ganesh in Fiddle

14 views
Skip to first unread message

sk...@googlecode.com

unread,
Jun 30, 2015, 3:43:02 PM6/30/15
to bu...@skia.org
Status: Accepted
Owner: bsalo...@google.com
Labels: FromSkiaPerf Type-Defect Priority-Medium

New issue 3998 by wang...@google.com: Repeated SkCanvas::ReadPixels(const
SkIRect&, SkBitmap*) fails for Ganesh in Fiddle
https://code.google.com/p/skia/issues/detail?id=3998

The attached Fiddle code repeatedly draws a rotated bitmap to the canvas,
and then copies the pixels of the canvas into that same bitmap. Basically,
whatever image is in the bitmap gets repeatedly rotated. The canvas and
the bitmap have the same size and type.

The code works as expected in the rasterer but not in Ganesh; if
NUM_ROTATES is set high enough and the canvas/bitmap is large enough, we'll
get the error:

"Skia Error: Unknown error: ---- failed to create texture for cache [1024
1024]"

This can be reproduced in Fiddle with canvas size 1024x1024 and NUM_ROTATES
= 17 or above. Also, enable the "use an input bitmap" option.
----------

This bug was reported via fiddle.skia.org.

Visit this URL to see the details of the reported bug:

https://fiddle.skia.org/c/ea8dfbf781269c6334b7c1ab51a8e8e4.

Don't remove the above URL; it's used to match bugs to fiddles.


Attachments:
readpixels_texture_alloc_bug.txt 2.3 KB

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

sk...@googlecode.com

unread,
Jun 30, 2015, 4:51:40 PM6/30/15
to bu...@skia.org
Updates:
Status: WontFix
Labels: Area-GPU

Comment #1 on issue 3998 by bsalo...@google.com: Repeated
SkCanvas::ReadPixels(const SkIRect&, SkBitmap*) fails for Ganesh in Fiddle
https://code.google.com/p/skia/issues/detail?id=3998

This doesn't happen on my desktop when I paste the code into a GM. I did
notice that every draw of the bitmap to the canvas uploads to a new texture
(because the genID of the bitmap is bumped after the readpixels replaces
its contents). If I mark it as volatile then we reuse the same texture and
I don't see the couldn't create texture log on fiddle any longer. I suspect
the failure is related to using osmesa rather than a real GPU.

sk...@googlecode.com

unread,
Jul 9, 2015, 12:37:29 PM7/9/15
to bu...@skia.org

Comment #2 on issue 3998 by wang...@google.com: Repeated
SkCanvas::ReadPixels(const SkIRect&, SkBitmap*) fails for Ganesh in Fiddle
https://code.google.com/p/skia/issues/detail?id=3998

Yeah it also worked fine for me when I made it into a GM. This issue is
probably just something with Fiddle.
Reply all
Reply to author
Forward
0 new messages