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

Issue 1465773003: Pack and align SkStrokeRec to 4-byte boundary. (Closed)

Created:
5 years, 1 month ago by jvanverth1
Modified:
5 years, 1 month ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Pack and align SkStrokeRec to 4-byte boundary. The new key for the distance field path cache will contain an SkStrokeRec. This change guarantees that we don't have any hidden padding that has garbage values, thereby preventing apparently equal keys from hashing to two different values. This also has the nice effect of reducing the size of SkStrokeRec from 24 bytes to 16 bytes. Committed: https://skia.googlesource.com/skia/+/897c9937636c2287bb217c76da9a56afb43050ac

Patch Set 1 #

Total comments: 1

Patch Set 2 : Remove anonymous struct #

Patch Set 3 : Fix bool alignment #

Patch Set 4 : Use u32; add comments #

Patch Set 5 : One more comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -9 lines) Patch
M include/core/SkStrokeRec.h View 1 2 3 4 2 chunks +11 lines, -5 lines 0 comments Download
M src/core/SkStrokeRec.cpp View 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 25 (11 generated)
jvanverth1
5 years, 1 month ago (2015-11-20 14:41:15 UTC) #3
bsalomon
lgtm
5 years, 1 month ago (2015-11-20 14:50:30 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1465773003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1465773003/1
5 years, 1 month ago (2015-11-20 14:51:30 UTC) #6
mtklein
https://codereview.chromium.org/1465773003/diff/1/include/core/SkStrokeRec.h File include/core/SkStrokeRec.h (right): https://codereview.chromium.org/1465773003/diff/1/include/core/SkStrokeRec.h#newcode118 include/core/SkStrokeRec.h:118: struct { So, anonymous structs are not technically part ...
5 years, 1 month ago (2015-11-20 14:57:25 UTC) #8
jvanverth1
On 2015/11/20 14:57:25, mtklein wrote: > https://codereview.chromium.org/1465773003/diff/1/include/core/SkStrokeRec.h > File include/core/SkStrokeRec.h (right): > > https://codereview.chromium.org/1465773003/diff/1/include/core/SkStrokeRec.h#newcode118 > ...
5 years, 1 month ago (2015-11-20 15:10:43 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1465773003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1465773003/40001
5 years, 1 month ago (2015-11-20 15:22:50 UTC) #13
reed1
Seems like there is still invisible padding, since we have an odd number of 16bit ...
5 years, 1 month ago (2015-11-20 15:27:17 UTC) #15
mtklein
On 2015/11/20 at 15:27:17, reed wrote: > Seems like there is still invisible padding, since ...
5 years, 1 month ago (2015-11-20 15:45:22 UTC) #17
reed1
oops, I got lazy and didn't connect the int-sizes + bit-sizes. I think using uin16_t ...
5 years, 1 month ago (2015-11-20 16:08:35 UTC) #18
mtklein
On 2015/11/20 at 16:08:35, reed wrote: > oops, I got lazy and didn't connect the ...
5 years, 1 month ago (2015-11-20 17:29:26 UTC) #19
jvanverth1
Updated the patch to incorporate comments. One thing: we still don't quite get equality between ...
5 years, 1 month ago (2015-11-20 18:21:37 UTC) #20
reed1
api lgtm
5 years, 1 month ago (2015-11-20 18:27:21 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1465773003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1465773003/80001
5 years, 1 month ago (2015-11-20 18:35:03 UTC) #24
commit-bot: I haz the power
5 years, 1 month ago (2015-11-20 21:32:35 UTC) #25
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://skia.googlesource.com/skia/+/897c9937636c2287bb217c76da9a56afb43050ac

Powered by Google App Engine
This is Rietveld 408576698