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

Issue 6503126: Added functor to GrTHashCache to allow discovery of un-reffed resources (Closed)

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

Description

Added functor to GrTHashCache to allow discovery of un-reffed resources

Patch Set 1 #

Patch Set 2 : Cleaned up #

Patch Set 3 : Added unit test #

Patch Set 4 : templatized find function on functor type #

Patch Set 5 : removed cruft #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+213 lines, -9 lines) Patch
M gyp/tests.gyp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/gpu/GrTHashCache.h View 1 2 3 4 3 chunks +42 lines, -9 lines 4 comments Download
A tests/HashCacheTest.cpp View 1 2 3 1 chunk +170 lines, -0 lines 0 comments Download

Messages

Total messages: 7
robertphillips
12 years, 2 months ago (2012-09-17 19:06:25 UTC) #1
bsalomon
On 2012/09/17 19:06:25, robertphillips wrote: Rather than a base class and virtual on the functor, ...
12 years, 2 months ago (2012-09-17 19:25:04 UTC) #2
robertphillips
That would make it difficult to access the same cache with different search mechanisms. For ...
12 years, 2 months ago (2012-09-17 19:36:47 UTC) #3
bsalomon
On 2012/09/17 19:36:47, robertphillips wrote: > That would make it difficult to access the same ...
12 years, 2 months ago (2012-09-17 19:50:19 UTC) #4
robertphillips
PTAL - I have templatized the find method on the functor's type.
12 years, 2 months ago (2012-09-18 15:41:08 UTC) #5
bsalomon
LGTM w/ some Qs http://codereview.appspot.com/6503126/diff/11001/src/gpu/GrTHashCache.h File src/gpu/GrTHashCache.h (right): http://codereview.appspot.com/6503126/diff/11001/src/gpu/GrTHashCache.h#newcode16 src/gpu/GrTHashCache.h:16: // GrTDefaultFindFunctor implements the default ...
12 years, 2 months ago (2012-09-18 15:49:38 UTC) #6
robertphillips
12 years, 2 months ago (2012-09-18 17:17:01 UTC) #7
committed as r5587

http://codereview.appspot.com/6503126/diff/11001/src/gpu/GrTHashCache.h
File src/gpu/GrTHashCache.h (right):

http://codereview.appspot.com/6503126/diff/11001/src/gpu/GrTHashCache.h#newco...
src/gpu/GrTHashCache.h:16: // GrTDefaultFindFunctor implements the default find
behavior for
Although it is supposed to work in VS, locally-defined classes are supposedly
forbidden in templates (b.c. they have no linkage)

http://codereview.appspot.com/6503126/diff/11001/src/gpu/GrTHashCache.h#newco...
src/gpu/GrTHashCache.h:41: template <typename FindFuncType> T*  find(const Key&,
const FindFuncType&) const;
You suggested functors a couple of days ago.
Sign in to reply to this message.

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