aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/HashCacheTest.cpp
Commit message (Collapse)AuthorAge
* Finish removing GrTHashTableGravatar robertphillips2014-07-29
| | | | | | | | | | This class is no longer used in Ganesh (in favor of SkTDynamicHash) R=jvanverth@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/421253003
* Move macros from TestClassDef.h to Test.hGravatar commit-bot@chromium.org2014-01-14
| | | | | | | | | | | | | | Motivation: those macros don't make any sense without the definitions in Test.h. BUG= R=mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/138563004 git-svn-id: http://skia.googlecode.com/svn/trunk@13074 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use DEFINE_TESTCLASS_SHORT macro in tests.Gravatar tfarina@chromium.org2013-12-12
| | | | | | | | | | | | | The three version of DEFINE_TESTCLASS macro is deprecated and thus just use the simple, short one. BUG=None TEST=out/Debug/tests R=mtklein@google.com, bsalomon@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/100113004 git-svn-id: http://skia.googlecode.com/svn/trunk@12653 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting r12427Gravatar rmistry@google.com2013-12-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12428 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2013-12-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12427 2bbb7eff-a529-9590-31e7-b0007b416f81
* Speed up GrResourceCache lookup by inlining GrBinHashKey comparisonsGravatar commit-bot@chromium.org2013-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GCC compilers for Android and Ubuntu do not seem to be able to inline the memcmp operations on GrBinHashKey data. Write the comparisons manually. Also shortcut GrBinHashKey::EQ to skip comparison when hashes do not match. Speeds up grresourcecache_find test on ARM and x86_64. Speeds up grresourcecache_add on x86_64. In order to test the change, moves ad hoc Gr unit tests from src/gr_unittest.cpp to tests/GrUnitTests to be consistent with other tests and enables GrUnitTests. Fixes a regression from r2863 with where re-setting GrBinHashKey data would not set the hash correctly. This should also improve the hash function itself. The regression caused many of the hash operations be no-ops. This is caught by the unit test. Renames the comparison functions that GrHashTable needs from EQ, LT to Equals, LessThan. Renames GrTBinHashKey to GrBinHashKey. The GrTBinHashKey used to forward comparison functions to an ENTRY template class, which would extract the key and call back to the GrTBinHashKey. This would save the user from writing one comparison function when comparison was done with int ENTRY::compare(). There's no real benefit in this now. Also this was used only for one class (GrTextureStripAtlas). The other use in GrResourceKey was not actually using the provided "shortcut". The new GrBinHashKey is not templated with the entry, rather just provides == and < functions. The users of GrTHashTable provide the needed functions now. Adds explicit documentation of functions that are actually needed GrTHashTable for the Key template. Adds SK_DEBUG guards according to the contract. R=bsalomon@google.com, mtklein@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/88113002 git-svn-id: http://skia.googlecode.com/svn/trunk@12426 2bbb7eff-a529-9590-31e7-b0007b416f81
* Clean up the GrTHashTable API.Gravatar commit-bot@chromium.org2013-10-27
| | | | | | | | | | | | | removeAt() and slowFindIndex() were only used by GrFontCache, and didn't really need to exist: they can be replaced by a simple remove() call. This new code should actually be faster; slowFindIndex() was O(N), and this should be O(lg N). BUG= R=bsalomon@google.com, jvanverth@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/43383006 git-svn-id: http://skia.googlecode.com/svn/trunk@11973 2bbb7eff-a529-9590-31e7-b0007b416f81
* GrTHashCache -> GrTHashTableGravatar mtklein@google.com2013-10-21
| | | | | | | | | | | The class is Table, but the file's Cache. That's confusing. BUG= R=bsalomon@google.com Review URL: https://codereview.chromium.org/32523004 git-svn-id: http://skia.googlecode.com/svn/trunk@11898 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replace uses of GR_DEBUG by SK_DEBUG.Gravatar commit-bot@chromium.org2013-08-28
| | | | | | | | | | | BUG=None R=bsalomon@google.com, robertphillips@google.com Author: tfarina@chromium.org Review URL: https://chromiumcodereview.appspot.com/23137022 git-svn-id: http://skia.googlecode.com/svn/trunk@10978 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make GPU unit tests use GrContexts of different GL types.Gravatar bsalomon@google.com2013-02-04
| | | | | | Review URL: https://codereview.appspot.com/7281046 git-svn-id: http://skia.googlecode.com/svn/trunk@7540 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-09-19
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5594 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix for r5587 compiler error (removed ../src/gpu in HashCacheTest.cpp)Gravatar robertphillips@google.com2012-09-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5588 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added functor to GrTHashCache to allow discovery of un-reffed resourcesGravatar robertphillips@google.com2012-09-18
http://codereview.appspot.com/6503126/ git-svn-id: http://skia.googlecode.com/svn/trunk@5587 2bbb7eff-a529-9590-31e7-b0007b416f81