Commit Graph

22 Commits

Author SHA1 Message Date
Hal Canary
95e3c058ef SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h
* SkAutoFree moved to SkTemplates.h (now implmented with unique_ptr).

  * SkAutoMalloc and SkAutoSMalloc moved to SkAutoMalloc.h

  * "SkAutoFree X(sk_malloc_throw(N));" --> "SkAutoMalloc X(N);"

Revert "Revert 'SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h'"
This reverts commit c456b73fef.

Change-Id: Ie2c1a17c20134b8ceab85a68b3ae3e61c24fbaab
Reviewed-on: https://skia-review.googlesource.com/6886
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-01-11 18:55:34 +00:00
Kevin Lubick
c456b73fef Revert "SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h"
This reverts commit a5494f1170.

Reason for revert: Broke Google3

Original change's description:
> SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h
> 
>   * SkAutoFree moved to SkTemplates.h (now implmented with unique_ptr).
> 
>   * SkAutoMalloc and SkAutoSMalloc moved to SkAutoMalloc.h
> 
>   * "SkAutoFree X(sk_malloc_throw(N));" --> "SkAutoMalloc X(N);"
> 
> Change-Id: Idacd86ca09e22bf092422228599ae0d9bedded88
> Reviewed-on: https://skia-review.googlesource.com/4543
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>
> 

TBR=halcanary@google.com,bungeman@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ie8bd176121c3ee83c110d66c0d0ac65e09bfc9c5
Reviewed-on: https://skia-review.googlesource.com/6884
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2017-01-11 17:22:12 +00:00
Hal Canary
a5494f1170 SkTypes.h : move SkAutoMalloc into SkAutoMalloc.h
* SkAutoFree moved to SkTemplates.h (now implmented with unique_ptr).

  * SkAutoMalloc and SkAutoSMalloc moved to SkAutoMalloc.h

  * "SkAutoFree X(sk_malloc_throw(N));" --> "SkAutoMalloc X(N);"

Change-Id: Idacd86ca09e22bf092422228599ae0d9bedded88
Reviewed-on: https://skia-review.googlesource.com/4543
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-01-11 15:36:45 +00:00
halcanary
96fcdcc219 Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002

Review URL: https://codereview.chromium.org/1316233002
2015-08-27 07:41:16 -07:00
scroggo
d49f48ddf7 Add test for SkRegion::writeToMemory.
When calling SkRegion::writeToMemory(NULL), it should return the same
number of bytes that it writes when calling
SkRegion::writeToMemory(buffer). Add a test to confirm this.

BUG=b/21271229

Review URL: https://codereview.chromium.org/1188293002
2015-06-18 06:16:36 -07:00
reed
c1b11f1db6 Handle paths that do not report empty, but have no edges.
patch from issue 999963005 at patchset 1 (http://crrev.com/999963005#ps1)

BUG=skia:3527

Review URL: https://codereview.chromium.org/1008883002
2015-03-13 08:48:27 -07:00
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
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
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
skia.committer@gmail.com
72b2e6fff3 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6344 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-08 02:03:56 +00:00
reed@google.com
bb094b947b fix SkRegion::intersects(rect) where the part of the rgn that we intersect is
the last run. The old bug was that we did an early exit from the loop because
we were comparing against the next rgn.bottom, instead of the current one.

inspired and fixed by danakj http://code.google.com/p/skia/issues/detail?id=958
Review URL: https://codereview.appspot.com/6812099

git-svn-id: http://skia.googlecode.com/svn/trunk@6327 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-07 14:23:42 +00:00
mike@reedtribe.org
796a1753d9 fix SkRegion::contains(rect), thanks to danakj and http://code.google.com/p/skia/issues/detail?id=958
git-svn-id: http://skia.googlecode.com/svn/trunk@6324 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-07 03:39:46 +00:00
mike@reedtribe.org
5a7ae4f5e5 add SkRegion tests, inspired by http://code.google.com/p/skia/issues/detail?id=958
git-svn-id: http://skia.googlecode.com/svn/trunk@6323 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-07 01:57:32 +00:00
rmistry@google.com
d6176b0dca Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part II of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6474054

git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-23 18:14:13 +00:00
reed@google.com
684119d126 add more tests for rgn::intersects(rect)
git-svn-id: http://skia.googlecode.com/svn/trunk@3820 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-02 16:52:12 +00:00
reed@google.com
7ab71baf65 add more tests around contains for rects and regions
git-svn-id: http://skia.googlecode.com/svn/trunk@3818 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-02 16:09:21 +00:00
reed@google.com
8a0d8ff854 add tests for how empty regions should behave in intersects() and contains()
Review URL: https://codereview.appspot.com/6134053

git-svn-id: http://skia.googlecode.com/svn/trunk@3795 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-04-30 16:28:04 +00:00
mike@reedtribe.org
67c3184a67 add test for contains and intersects, in advance of optimization work
git-svn-id: http://skia.googlecode.com/svn/trunk@3787 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-04-28 20:09:19 +00:00
epoger@google.com
ec3ed6a5eb Automatic update of all copyright notices to reflect new license terms.
I have manually examined all of these diffs and restored a few files that
seem to require manual adjustment.

The following files still need to be modified manually, in a separate CL:

android_sample/SampleApp/AndroidManifest.xml
android_sample/SampleApp/res/layout/layout.xml
android_sample/SampleApp/res/menu/sample.xml
android_sample/SampleApp/res/values/strings.xml
android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java
android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java
experimental/CiCarbonSampleMain.c
experimental/CocoaDebugger/main.m
experimental/FileReaderApp/main.m
experimental/SimpleCocoaApp/main.m
experimental/iOSSampleApp/Shared/SkAlertPrompt.h
experimental/iOSSampleApp/Shared/SkAlertPrompt.m
experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig
experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig
experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig
gpu/src/android/GrGLDefaultInterface_android.cpp
gyp/common.gypi
gyp_skia
include/ports/SkHarfBuzzFont.h
include/views/SkOSWindow_wxwidgets.h
make.bat
make.py
src/opts/memset.arm.S
src/opts/memset16_neon.S
src/opts/memset32_neon.S
src/opts/opts_check_arm.cpp
src/ports/SkDebug_brew.cpp
src/ports/SkMemory_brew.cpp
src/ports/SkOSFile_brew.cpp
src/ports/SkXMLParser_empty.cpp
src/utils/ios/SkImageDecoder_iOS.mm
src/utils/ios/SkOSFile_iOS.mm
src/utils/ios/SkStream_NSData.mm
tests/FillPathTest.cpp
Review URL: http://codereview.appspot.com/4816058

git-svn-id: http://skia.googlecode.com/svn/trunk@1982 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-28 14:26:00 +00:00
reed@android.com
097a351353 add SkRegion::setRects(), and its unit tests
git-svn-id: http://skia.googlecode.com/svn/trunk@588 2bbb7eff-a529-9590-31e7-b0007b416f81
2010-07-13 18:35:14 +00:00