Commit Graph

16 Commits

Author SHA1 Message Date
tfarina@chromium.org
8f6884aab8 Cleanup: Sanitize the order of includes under tests/
Initially this was to make sure Test.h appeared after the Sk*.h includes.

Patch generated by the following command line:

$ ~/chromium/src/tools/sort-headers.py tests/*.cpp

BUG=None
TEST=tests
R=robertphillips@google.com

Review URL: https://codereview.chromium.org/145313004

git-svn-id: http://skia.googlecode.com/svn/trunk@13177 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-24 20:56:26 +00:00
commit-bot@chromium.org
e2eac8b2fd Move macros from TestClassDef.h to Test.h
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
2014-01-14 21:04:37 +00:00
tfarina@chromium.org
e4fafb146e Use DEFINE_TESTCLASS_SHORT macro in tests.
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
2013-12-12 21:11:12 +00:00
commit-bot@chromium.org
ab1c13864d Fix compilation with SK_ENABLE_INST_COUNT=1
Add INHERITED declarations to class declarations that prevent
compilation with the flag.

Remove SK_DEFINE_INST_COUNT from all class implementations.  Instead,
use function-local static variables in the reference count helper
classes to create the global instances to store the needed info. The
accessor functions are defined inline in the helper classes, so
definitions are not needed. The initialization point of the variables
should be as well defined as previously.

Remove SK_DECLARE_INST_COUNT_TEMPLATE and use SK_DECLARE_INST_COUNT
instead. This avoids possible future compilation errors further.

For SK_ENABLE_INST_COUNT=0 compilation, add an empty static member
function to all classes that use SK_DECLARE_INST_COUNT and
SK_DECLARE_INST_COUNT_ROOT macros. The function ensures that classes
contain public INHERITED typedef. This member function seems to be
compiled away. This shouĺd ensure that part of the compilation errors
are caught earlier.

Also adds DSK_DECLARE_INST_COUNT to few SkPDFDict subclasses.

R=robertphillips@google.com, richardlin@chromium.org, bsalomon@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/98703002

git-svn-id: http://skia.googlecode.com/svn/trunk@12501 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-05 12:08:12 +00:00
commit-bot@chromium.org
e0e7cfe44b Change old PRG to be SkLCGRandom; change new one to SkRandom
The goal here is to get people to start using the new random number
generator, while leaving the old one in place so we don't have to 
rebaseline GMs.

R=reed@google.com, bsalomon@google.com

Author: jvanverth@google.com

Review URL: https://chromiumcodereview.appspot.com/23576015

git-svn-id: http://skia.googlecode.com/svn/trunk@11169 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-09 20:09:12 +00:00
commit-bot@chromium.org
515dcd3603 Replace uses of GR_DEBUG by SK_DEBUG.
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
2013-08-28 14:17:03 +00:00
jvanverth@google.com
c490f801b0 Change random number generator for 'tests' to SkMWCRandom. Also removes some
unused headers and fixes a couple of bugs exposed by changing the random 
number generator:

First, the function SkMatrix::getMaxStretch() had an error where it was testing
the square of a number against near-zero. This led to it occasionally taking a
cheaper but imprecise path for computing the eigenvalues of the matrix. It's 
been replaced with a check against the square of SK_ScalarNearlyZero. 

The second case was a failure in ClipStackTest, where it hit the rare case of 
a practically empty clip stack (it has a single Union) and we set a tight 
bounds. The bounds rect doesn't get set by GrReducedClip::ReduceClipStack() in 
this case, so when it clips the reduced stack it's clipping against garbage, 
and the resulting regions don't match. The solution is to initialize the 
tightBounds rect.


git-svn-id: http://skia.googlecode.com/svn/trunk@7952 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-04 13:56:38 +00:00
bsalomon@google.com
4e23068b37 Re-enable inst counting in debug builds.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/7098066

git-svn-id: http://skia.googlecode.com/svn/trunk@7206 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-15 20:37:04 +00:00
bsalomon@google.com
ebce030108 Fix stale iterators in LList test. Add newline to end of SkTLList.h
git-svn-id: http://skia.googlecode.com/svn/trunk@6663 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-04 14:48:57 +00:00
skia.committer@gmail.com
e659c2e820 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6660 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-04 02:01:25 +00:00
bsalomon@google.com
dd3f7a9efe Reland r6649 with fix for build errors.
git-svn-id: http://skia.googlecode.com/svn/trunk@6653 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 19:47:41 +00:00
bsalomon@google.com
acc71aa5c2 Revert 6649 due to build breaks.
git-svn-id: http://skia.googlecode.com/svn/trunk@6651 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 19:18:57 +00:00
bsalomon@google.com
4928f86eda Insert in middle of SkTInternalLList and SkTLList, in place cons for
SkTLList.

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6870050

git-svn-id: http://skia.googlecode.com/svn/trunk@6649 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 19:05:44 +00:00
bsalomon@google.com
bbe52908a2 Add SkTLList, linked list class implemented on top of the internal llist class.
R=robertphillips@google.com
Committed: https://code.google.com/p/skia/source/detail?r=6644
Review URL: https://codereview.appspot.com/6869049

git-svn-id: http://skia.googlecode.com/svn/trunk@6647 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 18:01:45 +00:00
bsalomon@google.com
08cb7286c6 Revert change accidentally committed.
git-svn-id: http://skia.googlecode.com/svn/trunk@6645 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 15:59:52 +00:00
bsalomon@google.com
d29902e0d7 Add SkTLList, linked list class implemented on top of the internal llist class.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6869049

git-svn-id: http://skia.googlecode.com/svn/trunk@6644 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 15:54:12 +00:00