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

Issue 6356059: add SkChecksum as a static class, for the replacement API (Closed)

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

Description

add SkChecksum as a static class, for the replacement API after this lands, plan to deprecate/remove the older APIs Committed: https://code.google.com/p/skia/source/detail?r=4457

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -2 lines) Patch
M bench/ChecksumBench.cpp View 2 chunks +22 lines, -2 lines 0 comments Download
M include/core/SkChecksum.h View 1 1 chunk +73 lines, -0 lines 1 comment Download

Messages

Total messages: 11
reed1
12 years, 5 months ago (2012-07-03 17:56:22 UTC) #1
reed1
Here are a 32bit and 64bit run of the bench (both compiled on a Mac) ...
12 years, 5 months ago (2012-07-03 17:57:38 UTC) #2
junov1
https://codereview.appspot.com/6356059/diff/1/include/core/SkChecksum.h File include/core/SkChecksum.h (right): https://codereview.appspot.com/6356059/diff/1/include/core/SkChecksum.h#newcode79 include/core/SkChecksum.h:79: static inline uintptr_t Mash(uintptr_t total, uintptr_t value) { As ...
12 years, 5 months ago (2012-07-03 18:47:27 UTC) #3
bsalomon
https://codereview.appspot.com/6356059/diff/1/include/core/SkChecksum.h File include/core/SkChecksum.h (right): https://codereview.appspot.com/6356059/diff/1/include/core/SkChecksum.h#newcode116 include/core/SkChecksum.h:116: result ^= result >> HALFBITS; On 2012/07/03 18:47:28, junov1 ...
12 years, 5 months ago (2012-07-03 18:55:01 UTC) #4
junov1
You're, right. Just tested it.
12 years, 5 months ago (2012-07-03 19:06:47 UTC) #5
reed1
The Mash function is getting inlined (checked the disassembly). Skia has gobs of those sorts ...
12 years, 5 months ago (2012-07-03 19:12:36 UTC) #6
reed1
patch #2 has updated comments, to make some of the tricky 32/64 magic clearer. I ...
12 years, 5 months ago (2012-07-03 19:21:59 UTC) #7
bsalomon
https://codereview.appspot.com/6356059/diff/6001/include/core/SkChecksum.h File include/core/SkChecksum.h (right): https://codereview.appspot.com/6356059/diff/6001/include/core/SkChecksum.h#newcode71 include/core/SkChecksum.h:71: class SkChecksum : SkNoncopyable { namespace?
12 years, 5 months ago (2012-07-03 19:28:58 UTC) #8
reed1
On 2012/07/03 19:28:58, bsalomon wrote: > https://codereview.appspot.com/6356059/diff/6001/include/core/SkChecksum.h > File include/core/SkChecksum.h (right): > > https://codereview.appspot.com/6356059/diff/6001/include/core/SkChecksum.h#newcode71 > ...
12 years, 5 months ago (2012-07-03 19:42:16 UTC) #9
bsalomon
On 2012/07/03 19:42:16, reed1 wrote: > On 2012/07/03 19:28:58, bsalomon wrote: > > https://codereview.appspot.com/6356059/diff/6001/include/core/SkChecksum.h > ...
12 years, 5 months ago (2012-07-03 19:53:53 UTC) #10
junov1
12 years, 5 months ago (2012-07-04 13:56:17 UTC) #11
On 2012/07/03 19:53:53, bsalomon wrote:
> On 2012/07/03 19:42:16, reed1 wrote:
> > On 2012/07/03 19:28:58, bsalomon wrote:
> > > https://codereview.appspot.com/6356059/diff/6001/include/core/SkChecksum.h
> > > File include/core/SkChecksum.h (right):
> > > 
> > >
> >
>
https://codereview.appspot.com/6356059/diff/6001/include/core/SkChecksum.h#ne...
> > > include/core/SkChecksum.h:71: class SkChecksum : SkNoncopyable {
> > > namespace?
> > 
> > namespace can also work, but so far we don't have a formal namespace that
has
> > leaked into our public APIs. We use static classes like this one for that
> > purpose : SkFontHost, SkGradientShader, etc. Something to consider for the
> > future perhaps.
> 
> LGTM

lgtm
Sign in to reply to this message.

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