WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
92008
[chromium] WebViewBenchmarkSupport::paint API does not work with recording canvas
https://bugs.webkit.org/show_bug.cgi?id=92008
Summary
[chromium] WebViewBenchmarkSupport::paint API does not work with recording ca...
Alok Priyadarshi
Reported
2012-07-23 10:40:50 PDT
WebViewBenchmarkSupport owns the canvas created by PaintClient. This does not work in the case of a recording canvas, which is owned by SkPicture.
Attachments
proposed patch
(2.49 KB, patch)
2012-07-23 14:45 PDT
,
Alok Priyadarshi
no flags
Details
Formatted Diff
Diff
proposed patch
(3.84 KB, patch)
2012-07-24 10:17 PDT
,
Alok Priyadarshi
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Alok Priyadarshi
Comment 1
2012-07-23 14:45:15 PDT
Created
attachment 153866
[details]
proposed patch
WebKit Review Bot
Comment 2
2012-07-23 14:48:51 PDT
Please wait for approval from
abarth@webkit.org
,
dglazkov@chromium.org
,
fishd@chromium.org
,
jamesr@chromium.org
or
tkent@chromium.org
before submitting, as this patch contains changes to the Chromium public API. See also
https://trac.webkit.org/wiki/ChromiumWebKitAPI
.
Nat Duca
Comment 3
2012-07-23 15:23:15 PDT
Comment on
attachment 153866
[details]
proposed patch Dumb quesiton --- why not just not doing the ownptr thing and clarifying on the comment that the client must ensure the created canvases get deleted? E.g. no destroyCanvas call
Alok Priyadarshi
Comment 4
2012-07-23 15:30:05 PDT
(In reply to
comment #3
)
> (From update of
attachment 153866
[details]
) > Dumb quesiton --- why not just not doing the ownptr thing and clarifying on the comment that the client must ensure the created canvases get deleted? E.g. no destroyCanvas call
Yeah - if we clarify that the canvas can be disposed of after didPaint call. I thought being explicit would be better. Darin: What do you think?
Daniel Murphy
Comment 5
2012-07-23 15:36:09 PDT
So the issue is that it wasn't destructing? I'm doing the following: SkDevice* device = new SkDevice(SkBitmap::kARGB_8888_Config, size.width, size.height, false); WebCanvas* canvas = new WebCanvas(device); device->unref(); return canvas; for creating a canvas, which bascically matches the SkCanvas constructor for creating a canvas using a bitmap
Daniel Murphy
Comment 6
2012-07-23 15:52:13 PDT
Looking at SkPicture, this makes sense. Alok suggested having willPaint return a canvas, which sounds sounds good.
Darin Fisher (:fishd, Google)
Comment 7
2012-07-23 16:23:43 PDT
(In reply to
comment #6
)
> Looking at SkPicture, this makes sense. Alok suggested having willPaint return a canvas, which sounds sounds good.
I like the idea of having willPaint allocate the WebCanvas and didPaint destroy the canvas. WebCanvas* willPaint(const WebSize&) = 0; void didPaint(WebCanvas*) = 0; Then, we can just drop the create/destroyCanvas methods. Fewer methods == more better.
Alok Priyadarshi
Comment 8
2012-07-24 10:17:48 PDT
Created
attachment 154096
[details]
proposed patch Got rid of create/destroyCanvas. Modified will/didPaint interface and added comments.
Nat Duca
Comment 9
2012-07-25 11:23:17 PDT
Comment on
attachment 154096
[details]
proposed patch I like this. @fishd?
WebKit Review Bot
Comment 10
2012-07-25 12:50:44 PDT
Comment on
attachment 154096
[details]
proposed patch Clearing flags on attachment: 154096 Committed
r123645
: <
http://trac.webkit.org/changeset/123645
>
WebKit Review Bot
Comment 11
2012-07-25 12:50:49 PDT
All reviewed patches have been landed. Closing bug.
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