WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
57104
getCSSCanvasContext does not work with SKIA_GPU
https://bugs.webkit.org/show_bug.cgi?id=57104
Summary
getCSSCanvasContext does not work with SKIA_GPU
scroggo
Reported
2011-03-25 09:16:36 PDT
When building Chromium using SKIA_GPU, getCSSCanvasContext does not work as expected.
Attachments
patch that fixes the problem
(2.84 KB, patch)
2011-03-25 09:17 PDT
,
scroggo
no flags
Details
Formatted Diff
Diff
updated patch for style
(2.83 KB, patch)
2011-03-25 10:36 PDT
,
scroggo
no flags
Details
Formatted Diff
Diff
updated patch
(3.96 KB, patch)
2011-03-25 12:31 PDT
,
scroggo
jamesr
: review-
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
scroggo
Comment 1
2011-03-25 09:17:32 PDT
Created
attachment 86948
[details]
patch that fixes the problem
WebKit Review Bot
Comment 2
2011-03-25 09:20:14 PDT
Attachment 86948
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/platform/graphics/skia/PlatformContextSkia.h:162: Should only a single space after a punctuation in a comment. [whitespace/comments] [5] Source/WebCore/platform/graphics/skia/PlatformContextSkia.h:164: The parameter name "bitmap" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 2 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
scroggo
Comment 3
2011-03-25 10:36:13 PDT
Created
attachment 86956
[details]
updated patch for style
scroggo
Comment 4
2011-03-25 12:31:32 PDT
Created
attachment 86973
[details]
updated patch This patch adds guards so the new code will only be used if ENABLE(SKIA_GPU) (just in case; I did not see any adverse effect when turned off). Also, I follow the new path for other cases, fixing more layout tests for SKIA_GPU (yay!).
James Robinson
Comment 5
2011-03-25 13:45:17 PDT
Comment on
attachment 86973
[details]
updated patch Why doesn't drawing from a texture-backed SkBitmap into a non-texture backed skia context work? I was under the impression that skia would handle this case internally.
Mike Reed
Comment 6
2011-03-25 13:49:27 PDT
Skia automatically will draw a texture-backed-bitmap to a gl context, and a ram-backed-bitmap to a gl context. It does not automatically do the reverse: texture-backed-bitmap to a ram-backed canvas. If/when the layers and root of webkit are also gl-context backed, then we will be able to remove this code (and other) since we'll be in the optimal texture->texture drawing case.
James Robinson
Comment 7
2011-03-25 13:50:38 PDT
Comment on
attachment 86973
[details]
updated patch Feels like the wrong fix. In this case we're trying to draw from a SkBitmap into another context - skia already should know what the backing store for the bitmap is and should be capable of doing a readback if it needs the pixels available for a software draw.
Mike Reed
Comment 8
2011-03-25 13:53:26 PDT
We can look at that for the future, but the raster device has no knowledge of the texture that was created by another (gpu) device.
James Robinson
Comment 9
2011-03-25 13:55:48 PDT
(In reply to
comment #6
)
> Skia automatically will draw a texture-backed-bitmap to a gl context, and a ram-backed-bitmap to a gl context. It does not automatically do the reverse: texture-backed-bitmap to a ram-backed canvas.
Why not? Seems like if I have a texture backed bitmap and I tell skia that I want it rendered into a ram-backed canvas that a readback is required. What's other behaviors could be valid?
> > If/when the layers and root of webkit are also gl-context backed, then we will be able to remove this code (and other) since we'll be in the optimal texture->texture drawing case.
That's another argument for why this should be handled by Skia and not in WebKit code.
James Robinson
Comment 10
2011-03-25 14:17:57 PDT
Comment on
attachment 86973
[details]
updated patch View in context:
https://bugs.webkit.org/attachment.cgi?id=86973&action=review
We can discuss the best fix in person on Monday. In the meantime I've annotated some other issues that need to be addressed if we want to continue with this patch.
> Source/WebCore/ChangeLog:5 > + Make getCSSCanvasContext work on chromium using SKIA_GPU
You need a link to the bug as well - see the (brief) section in
http://www.webkit.org/coding/contributing.html
about ChangeLogs. the webkit-patch upload script will generate a properly formatted stub for you.
> Source/WebCore/ChangeLog:7 > + No new tests. (OOPS!)
Having the (OOPS!) here will will fail a presubmit check. Delete this line and replace it with some text describing what the change does and why it doesn't need new tests (in this case because the functionality is already handled by existing tests - it'd be helpful to lists which tests are included).
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug