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

Issue 7178045: Fixing invalid text clipping on SkPicture playback (Closed)

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

Description

Fixing invalid text clipping on SkPicture playback The bug was caused by an invalid assumption that a flattend object's index is related to its array index in SkFlatDictionary::fData. The data in SkFlatDictionary is sorted by flattened data content, not by index number. Problem was solved by passing down the SkFlatData* through addPaint, rather than the index value. The bug was causing SkPictureRecord::addFontMetricsTopBottom to use cached font metrics from the wrong SkPaint instance. BUG=https://code.google.com/p/chromium/issues/detail?id=170964 Committed: https://code.google.com/p/skia/source/detail?r=7312

Patch Set 1 #

Total comments: 5

Patch Set 2 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -46 lines) Patch
M src/core/SkPictureFlat.h View 1 5 chunks +24 lines, -30 lines 1 comment Download
M src/core/SkPictureRecord.h View 2 chunks +3 lines, -3 lines 0 comments Download
M src/core/SkPictureRecord.cpp View 1 9 chunks +15 lines, -13 lines 0 comments Download

Messages

Total messages: 12
junov
PTAL https://codereview.appspot.com/7178045/diff/1/src/core/SkPictureFlat.h File src/core/SkPictureFlat.h (left): https://codereview.appspot.com/7178045/diff/1/src/core/SkPictureFlat.h#oldcode658 src/core/SkPictureFlat.h:658: SkFlatData* writableFlatData(int index) { Removing this method. It ...
11 years, 10 months ago (2013-01-21 20:25:33 UTC) #1
junov
I'll add a unit test and re-upload a patch in a bit...
11 years, 10 months ago (2013-01-21 20:26:30 UTC) #2
reed1
Derek and I are confused. Can you have a brief VC with us to explain? ...
11 years, 10 months ago (2013-01-22 15:31:21 UTC) #3
junov1
More explanation: the fIndex member is the Id used to reference the flattened paint. These ...
11 years, 10 months ago (2013-01-22 16:06:46 UTC) #4
reed1
Note to selves: In a future CL, it might help if we remove the ability ...
11 years, 10 months ago (2013-01-22 16:29:05 UTC) #5
junov
New patch https://codereview.appspot.com/7178045/diff/7001/src/core/SkPictureFlat.h File src/core/SkPictureFlat.h (right): https://codereview.appspot.com/7178045/diff/7001/src/core/SkPictureFlat.h#newcode497 src/core/SkPictureFlat.h:497: const SkFlatData* findAndReturnFlat(const T& element) { Diff ...
11 years, 10 months ago (2013-01-22 16:50:56 UTC) #6
reed1
looks good. did you get a unittest to trigger the old bug?
11 years, 10 months ago (2013-01-22 16:54:13 UTC) #7
junov
On 2013/01/22 16:54:13, reed1 wrote: > looks good. did you get a unittest to trigger ...
11 years, 10 months ago (2013-01-22 17:41:31 UTC) #8
reed1
Hmmm, that sounds (a) fragile, and (b) hard to verify in the test itself. I'm ...
11 years, 10 months ago (2013-01-22 17:43:05 UTC) #9
reed1
lgtm
11 years, 10 months ago (2013-01-22 17:43:14 UTC) #10
junov
On 2013/01/22 17:43:14, reed1 wrote: > lgtm Sounds good. Besides the current code has decent ...
11 years, 10 months ago (2013-01-22 17:48:54 UTC) #11
junov
11 years, 10 months ago (2013-01-22 17:48:54 UTC) #12
On 2013/01/22 17:43:14, reed1 wrote:
> lgtm

Sounds good. Besides the current code has decent test coverage already. It's
just a checksum/order coincidence that existing tests did not fail before this
CL.
Sign in to reply to this message.

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