Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Issue 251533004: First pass at GPU veto (Closed)

Created:
6 years, 8 months ago by robertphillips
Modified:
6 years, 7 months ago
Reviewers:
reed1, bsalomon, alokp
CC:
skia-review_googlegroups.com, iancottrell
Visibility:
Public.

Description

First pass at GPU veto As a short term solution this CL collects information during the recording process for use in suitableForGpuRasterization. BUG=366495 Committed: http://code.google.com/p/skia/source/detail?r=14368

Patch Set 1 #

Total comments: 4

Patch Set 2 : Move ContentFlags out of SkPicture & correctly follow on from SkPictInfo flags #

Patch Set 3 : Now with counting #

Patch Set 4 : Now with concave path counting #

Total comments: 2

Patch Set 5 : Add counting of AA hairline stroked concave paths #

Unified diffs Side-by-side diffs Delta from patch set Stats (+166 lines, -5 lines) Patch
M include/core/SkPicture.h View 1 2 3 4 1 chunk +61 lines, -0 lines 0 comments Download
M src/core/SkPicture.cpp View 1 2 3 4 6 chunks +16 lines, -5 lines 0 comments Download
M src/core/SkPictureRecord.cpp View 1 2 3 4 2 chunks +13 lines, -0 lines 0 comments Download
M tests/PictureTest.cpp View 1 2 3 4 3 chunks +72 lines, -0 lines 0 comments Download
M tools/skpinfo.cpp View 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
robertphillips
https://codereview.chromium.org/251533004/diff/1/include/core/SkPicture.h File include/core/SkPicture.h (right): https://codereview.chromium.org/251533004/diff/1/include/core/SkPicture.h#newcode371 include/core/SkPicture.h:371: */ SkPictInfo is in src\core\SkPicturePlayback.h. Don't know if we ...
6 years, 8 months ago (2014-04-24 18:04:07 UTC) #1
bsalomon
https://codereview.chromium.org/251533004/diff/1/include/core/SkPicture.h File include/core/SkPicture.h (right): https://codereview.chromium.org/251533004/diff/1/include/core/SkPicture.h#newcode371 include/core/SkPicture.h:371: */ On 2014/04/24 18:04:07, robertphillips wrote: > SkPictInfo is ...
6 years, 8 months ago (2014-04-24 18:20:51 UTC) #2
robertphillips
https://codereview.chromium.org/251533004/diff/1/include/core/SkPicture.h File include/core/SkPicture.h (right): https://codereview.chromium.org/251533004/diff/1/include/core/SkPicture.h#newcode371 include/core/SkPicture.h:371: */ New version should address this.
6 years, 8 months ago (2014-04-24 18:27:26 UTC) #3
robertphillips
PTAL - now with counting.
6 years, 8 months ago (2014-04-24 19:38:59 UTC) #4
bsalomon
https://codereview.chromium.org/251533004/diff/60001/src/core/SkPicture.cpp File src/core/SkPicture.cpp (right): https://codereview.chromium.org/251533004/diff/60001/src/core/SkPicture.cpp#newcode612 src/core/SkPicture.cpp:612: static const int kNumAAConcavePaths = 1; Can we start ...
6 years, 8 months ago (2014-04-24 19:57:36 UTC) #5
robertphillips
6 years, 8 months ago (2014-04-24 20:31:41 UTC) #6
robertphillips
6 years, 8 months ago (2014-04-24 20:37:20 UTC) #7
bsalomon
lgtm. From in-person discussion with Rob: We probably don't need the actual SkSurface or GrRenderTarget. ...
6 years, 8 months ago (2014-04-24 20:46:56 UTC) #8
alokp
https://codereview.chromium.org/251533004/diff/60001/src/core/SkPicture.cpp File src/core/SkPicture.cpp (right): https://codereview.chromium.org/251533004/diff/60001/src/core/SkPicture.cpp#newcode612 src/core/SkPicture.cpp:612: static const int kNumAAConcavePaths = 1; On 2014/04/24 19:57:37, ...
6 years, 8 months ago (2014-04-24 20:55:21 UTC) #9
robertphillips
The CQ bit was checked by robertphillips@google.com
6 years, 8 months ago (2014-04-24 21:01:06 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/robertphillips@google.com/251533004/80001
6 years, 8 months ago (2014-04-24 21:01:54 UTC) #11
bsalomon
On 2014/04/24 20:55:21, Alok Priyadarshi wrote: > Would you have MSAA info in GrContext? I ...
6 years, 8 months ago (2014-04-24 21:02:10 UTC) #12
commit-bot: I haz the power
Change committed as 14368
6 years, 8 months ago (2014-04-24 21:53:36 UTC) #13
tomhudson
Do we need a second implementation of this with SkRecord? Why was this done via ...
6 years, 7 months ago (2014-04-28 11:03:24 UTC) #14
robertphillips
When SkRecord is integrated into the rest of Skia we will want to reimplement this ...
6 years, 7 months ago (2014-04-28 12:02:41 UTC) #15
mtklein
On 2014/04/28 12:02:41, robertphillips wrote: > When SkRecord is integrated into the rest of Skia ...
6 years, 7 months ago (2014-04-28 13:22:36 UTC) #16
tomhudson
6 years, 7 months ago (2014-04-28 13:48:11 UTC) #17
Message was sent while issue was closed.
On 2014/04/28 13:22:36, mtklein wrote:
> On 2014/04/28 12:02:41, robertphillips wrote:
> > When SkRecord is integrated into the rest of Skia we will want to
reimplement
> > this capability. In that world we will probably implement it as a quick scan
> > over the recorded operations. The current version was implemented as part of
> > SkPictureReocrd (rather then another pass over the data) to keep it fast
> coupled
> > with the knowledge that it will be going away soon. It probably isn't worth
> > currently implementing this in SkRecord since it is likely to be changing
> > rapidly short-term.
> 
> Yup, for fun I sketched up a version of the current logic for SkRecord.  It
was
> easy.  The important part here is figuring out what we want to veto.  Even
> starting from scratch, this will take ~no time to port to a scan over
SkRecord.

I'm not sure we understand any of Rob's reasons over here:

(1) We were hoping to turn on SkRecord in Chrome real soon now - perhaps even
this week? It's not clear to me/us what's blocking that.

(2) An algorithm like AnalysisCanvas didn't have to be a separate pass; the
reason for making it one was so that we could make a decision based on the
analysis results before we did the recording. If we don't need the results of
the analysis until rasterization time, it could be in a Canvas/Device subclass
rather than built into Skia.

(3) Making AnalysisCanvas part of the skia:: hierarchy was intended to make it
easier for Chrome to tune than is code in Skia; if we're tuning it based on
Chrome benchmark results rather than Skia microbenchmark results, shouldn't we
have the code in Chrome? If we're going to have to change it rapidly in the
short term, shouldn't we be aiming for that?

[Caveat: I've seen comment streams about getting rid of a lot of virtual
functions, but it looks like all the necessary ones are still there on SkDevice
and SkCanvas]

On the other hand, one of the ideas we've heard coming out of MTV is that they
want to use SkPictureRecord for software compositor, but SkRecord for GPU, on
the grounds of unspecified unsubstantiated performance fears. If that's the
course we choose going forward, this is making the decision between GPU and
not-GPU too late. (Or requiring supporting both playback methods for both
rasterization methods, which is also ugly. But we don't understand their current
approach to driving the GPU/software decision, either.)

Powered by Google App Engine
This is Rietveld 408576698