Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(70)

Issue 6903062: optimize for paints that don't require deep copy during clone (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years ago by reed1
Modified:
12 years ago
Reviewers:
Leon, DerekS
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

optimize for paints that don't require deep copy during clone Committed: https://code.google.com/p/skia/source/detail?r=6739

Patch Set 1 #

Patch Set 2 : #

Total comments: 13

Patch Set 3 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -7 lines) Patch
M src/core/SkPicturePlayback.cpp View 1 2 3 chunks +36 lines, -7 lines 1 comment Download

Messages

Total messages: 5
reed1
Not the most agressive change, but it does speed up some of our pages. Down ...
12 years ago (2012-12-10 16:20:35 UTC) #1
DerekS
lgtm with a nit https://codereview.appspot.com/6903062/diff/2001/src/core/SkPicturePlayback.cpp File src/core/SkPicturePlayback.cpp (right): https://codereview.appspot.com/6903062/diff/2001/src/core/SkPicturePlayback.cpp#newcode189 src/core/SkPicturePlayback.cpp:189: #ifdef SHOW_SHALLOW_COUNTER do we really ...
12 years ago (2012-12-10 16:32:05 UTC) #2
Leon
https://codereview.appspot.com/6903062/diff/2001/src/core/SkPicturePlayback.cpp File src/core/SkPicturePlayback.cpp (right): https://codereview.appspot.com/6903062/diff/2001/src/core/SkPicturePlayback.cpp#newcode149 src/core/SkPicturePlayback.cpp:149: static bool needDeepCopy(const SkPaint& paint) { need_deep_copy https://codereview.appspot.com/6903062/diff/2001/src/core/SkPicturePlayback.cpp#newcode190 src/core/SkPicturePlayback.cpp:190: ...
12 years ago (2012-12-10 16:34:43 UTC) #3
reed1
https://codereview.appspot.com/6903062/diff/2001/src/core/SkPicturePlayback.cpp File src/core/SkPicturePlayback.cpp (right): https://codereview.appspot.com/6903062/diff/2001/src/core/SkPicturePlayback.cpp#newcode149 src/core/SkPicturePlayback.cpp:149: static bool needDeepCopy(const SkPaint& paint) { On 2012/12/10 16:34:43, ...
12 years ago (2012-12-10 16:41:39 UTC) #4
Leon
12 years ago (2012-12-10 17:32:58 UTC) #5
lgtm, with one spelling error

https://codereview.appspot.com/6903062/diff/2001/src/core/SkPicturePlayback.cpp
File src/core/SkPicturePlayback.cpp (right):

https://codereview.appspot.com/6903062/diff/2001/src/core/SkPicturePlayback.c...
src/core/SkPicturePlayback.cpp:205: deepCopyInfo->paintData[i] =
SkFlatData::Create(&deepCopyInfo->controller,
On 2012/12/10 16:41:39, reed1 wrote:
> On 2012/12/10 16:34:43, scroggo-work wrote:
> > Why don't we set an SkBitmapHeap on the controller? From the assert below
> about
> > fBitmapHeap's count, it looks like the intent was to use fBitmapHeap. Should
> it
> > already have the bitmaps that are needed?
> 
> Separate CL?

https://codereview.appspot.com/6903063/

https://codereview.appspot.com/6903062/diff/2001/src/core/SkPicturePlayback.c...
src/core/SkPicturePlayback.cpp:235: if (deepCopyInfo->paintData[i]) {
On 2012/12/10 16:41:39, reed1 wrote:
> On 2012/12/10 16:34:43, scroggo-work wrote:
> > if (NULL == deepCopyInfo->paintData[i]) {
> 
> Since we need to know both the null and not-null cases, I think this matches
> existing skia pattern for checking for non-null, yes?

Sounds fine to me.

https://codereview.appspot.com/6903062/diff/5003/src/core/SkPicturePlayback.cpp
File src/core/SkPicturePlayback.cpp (right):

https://codereview.appspot.com/6903062/diff/5003/src/core/SkPicturePlayback.c...
src/core/SkPicturePlayback.cpp:225: // needs_deep_copy was falls, so just need
to assign
false*
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b