Commit Graph

362 Commits

Author SHA1 Message Date
reed@google.com
e2589aeebf Change SkFlatData to have a sentinel value, allowing the Compare function to
not need a loop-end-test.
Review URL: https://codereview.appspot.com/6355086

git-svn-id: http://skia.googlecode.com/svn/trunk@4517 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 19:38:01 +00:00
bsalomon@google.com
4eefe6132c Handle convex paths with degeneracies in cheap direction computation
Review URL: http://codereview.appspot.com/6349085/



git-svn-id: http://skia.googlecode.com/svn/trunk@4515 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 18:28:12 +00:00
robertphillips@google.com
59f46b81f8 Fixed Windows compiler complaints
http://codereview.appspot.com/6392044



git-svn-id: http://skia.googlecode.com/svn/trunk@4511 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 17:30:58 +00:00
keyar@chromium.org
c3d5831e05 Allow specific files and multiple inputs for picture testing tools.
Changed the render_pictures, bench_pictures and test_pictures.py so that multiple inputs can be given. Furthermore, specific files can also be specified.

Unit tests have also been added for picture_utils.cpp.

Committed http://code.google.com/p/skia/source/detail?r=4486

Review URL: https://codereview.appspot.com/6345054

git-svn-id: http://skia.googlecode.com/svn/trunk@4488 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 18:44:51 +00:00
mike@reedtribe.org
e60b9106ba add test for SkChecksum
git-svn-id: http://skia.googlecode.com/svn/trunk@4462 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 01:53:07 +00:00
reed@google.com
a63a851afb update test for new NewFromCString behavior
git-svn-id: http://skia.googlecode.com/svn/trunk@4431 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-02 20:29:00 +00:00
reed@google.com
dbc936dff3 add SkData::NewFromCString()
git-svn-id: http://skia.googlecode.com/svn/trunk@4383 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-28 15:40:09 +00:00
robertphillips@google.com
b74af872cc Separated Inst counting from the SK_DEBUG #define (now SK_ENABLE_INST_COUNT)
http://codereview.appspot.com/6353047/



git-svn-id: http://skia.googlecode.com/svn/trunk@4376 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-27 19:41:42 +00:00
djsollen@google.com
edae1416ba Fix metrics test to no longer include the cpp.
The inclusion of the cpp caused linker errors when building skia
components as shared libaries for inclusion in an Android app.
Review URL: https://codereview.appspot.com/6338063

git-svn-id: http://skia.googlecode.com/svn/trunk@4323 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-25 17:01:46 +00:00
bsalomon@google.com
4da34e36cb Add GrMemoryPool as a helper to override operators new/delete
Review URL: http://codereview.appspot.com/6306090/



git-svn-id: http://skia.googlecode.com/svn/trunk@4282 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-19 15:40:27 +00:00
reed@google.com
b59ed51564 add test for http://code.google.com/p/chromium/issues/detail?id=131181
git-svn-id: http://skia.googlecode.com/svn/trunk@4266 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-15 18:26:04 +00:00
schenney@chromium.org
fedd09ba7e Really fix the build.
git-svn-id: http://skia.googlecode.com/svn/trunk@4253 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-13 18:29:20 +00:00
schenney@chromium.org
aaf1688959 Speculative build fix. Tests do not fail locally.
git-svn-id: http://skia.googlecode.com/svn/trunk@4248 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-13 17:41:00 +00:00
schenney@chromium.org
7e963605d5 Fix the problem of rendering closePath not properly after a moveTo call in
canvas 2D interface. If there is a polyline, followed by a moveTo and a
closePath, both the moveTo and the closePath should be ignored for the purposes
of drawing, and the polyline should not be closed (unless force closed is true
(for filling, for instance).

Tested for path with both valid and degenerate content, when asked to
consume degenerates and not, force closed and not.

This patch also includes a uni test refactoring to reduce the amount of code
to test path iteration and zero length paths.

BUG=6297049

TEST=tests/PathTest.cpp, testIter method.
Review URL: https://codereview.appspot.com/6300086

git-svn-id: http://skia.googlecode.com/svn/trunk@4247 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-13 17:05:43 +00:00
reed@google.com
51c62a6cfa add readPtr and writePtr to SkReader32 and SkWriter32
add template helper SkSWriter32, which allocates initial storage buffer
Review URL: https://codereview.appspot.com/6299075

git-svn-id: http://skia.googlecode.com/svn/trunk@4237 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-12 20:47:53 +00:00
reed@google.com
7886ad3de1 remove SK_CAN_USE_FLOAT (deprecated)
git-svn-id: http://skia.googlecode.com/svn/trunk@4232 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-11 21:21:26 +00:00
djsollen@google.com
94e75ee46a Rename the existing flatten(void*) methods.
This change avoids naminc confusion with the SkFlattenable flatten methods and
also changes SkPath to use the void* model instead of taking a SkReader32.
Review URL: https://codereview.appspot.com/6299062

git-svn-id: http://skia.googlecode.com/svn/trunk@4215 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-08 18:30:46 +00:00
bsalomon@google.com
df9d656c35 Add SkPath::getVerbs/countVerbs
Review URL: http://codereview.appspot.com/6306053/


git-svn-id: http://skia.googlecode.com/svn/trunk@4209 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-07 21:43:15 +00:00
reed@google.com
83226976b5 extend asAGradient for Conical type (to be implemented by PDF and XPS)
Review URL: https://codereview.appspot.com/6308051

git-svn-id: http://skia.googlecode.com/svn/trunk@4207 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-07 20:26:47 +00:00
robertphillips@google.com
75b3c9633c Move clientID into texture desc
http://codereview.appspot.com/6305044/



git-svn-id: http://skia.googlecode.com/svn/trunk@4201 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-07 12:08:45 +00:00
caryclark@google.com
42639cddc3 fix warnings on Mac in tests
Fix these class of warnings:
- unused functions
- unused locals
- sign mismatch
- missing function prototypes
- missing newline at end of file
- 64 to 32 bit truncation

The changes prefer to link in dead code in the debug build
with 'if (false)' than to comment it out, but trivial cases
are commented out or sometimes deleted if it appears to be
a copy/paste error.
Review URL: https://codereview.appspot.com/6301045

git-svn-id: http://skia.googlecode.com/svn/trunk@4175 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-06 12:03:39 +00:00
robertphillips@google.com
977b9c8af3 Instance counting for SkRefCnt-derived objects (w/ CanvasTest fix)
http://codereview.appspot.com/6242070/



git-svn-id: http://skia.googlecode.com/svn/trunk@4170 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-05 19:35:09 +00:00
junov@chromium.org
4866cc0afb Adding option to serialize mutable bitmaps in SkPicture
BUG=http://code.google.com/p/chromium/issues/detail?id=115654
REVIEW=http://codereview.appspot.com/6221066/



git-svn-id: http://skia.googlecode.com/svn/trunk@4130 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-01 21:23:07 +00:00
robertphillips@google.com
d414406073 Windows compiler complaint cleanup
http://codereview.appspot.com/6262047/



git-svn-id: http://skia.googlecode.com/svn/trunk@4098 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-31 15:29:44 +00:00
bsalomon@google.com
5739d2c168 Merge GrGpuGLShaders into its parent class, GrGpuGL
Review URL: http://codereview.appspot.com/6245076/



git-svn-id: http://skia.googlecode.com/svn/trunk@4095 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-31 15:07:19 +00:00
epoger@google.com
f123ba9e21 Disable TLSTest for now, to work around http://code.google.com/p/skia/issues/detail?id=619
Review URL: https://codereview.appspot.com/6259056

git-svn-id: http://skia.googlecode.com/svn/trunk@4090 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-31 13:54:51 +00:00
djsollen@google.com
d2700eec7e Refactor dictionaries for use by entities other than just SkPicture
Review URL: https://codereview.appspot.com/6101043

git-svn-id: http://skia.googlecode.com/svn/trunk@4077 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-30 16:54:13 +00:00
robertphillips@google.com
00bf06a142 Added cast to get MathTest working on Windows
git-svn-id: http://skia.googlecode.com/svn/trunk@4072 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-30 15:19:17 +00:00
reed@google.com
c20bc25b6e use (float)(1 << 23) instead of 1.0p+23 since the latter isn't supported in VS
git-svn-id: http://skia.googlecode.com/svn/trunk@4068 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-30 13:48:14 +00:00
reed@google.com
c3b697298e win can't eat 1.0p+23 syntax for floats :(
git-svn-id: http://skia.googlecode.com/svn/trunk@4067 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-30 12:43:59 +00:00
reed@google.com
a7d7461cf0 remove debugf
git-svn-id: http://skia.googlecode.com/svn/trunk@4066 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-30 12:30:09 +00:00
reed@google.com
744fabad47 addPoly() entry-point, to quickly add MoveTo+N*LineTo (useful in dashing)
Review URL: https://codereview.appspot.com/6256063

git-svn-id: http://skia.googlecode.com/svn/trunk@4061 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-29 19:54:52 +00:00
reed@google.com
8b06f1a7ff Detect when the caller was hairline AND strokeandfill, and resolve that into FILL
This fixes the unittests on WIN in the trybot for DEPS roll 4048
Review URL: https://codereview.appspot.com/6242057

git-svn-id: http://skia.googlecode.com/svn/trunk@4057 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-29 12:03:46 +00:00
reed@google.com
b6a4b7363f add
git-svn-id: http://skia.googlecode.com/svn/trunk@4010 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-21 15:27:23 +00:00
bungeman@google.com
a550199c6f CreateTypefaceFromStream for GDI.
http://codereview.appspot.com/5616047/


git-svn-id: http://skia.googlecode.com/svn/trunk@4001 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-18 19:06:41 +00:00
reed@google.com
ebd24962df change SkChunkAlloc to grow its allocations geometrically (not linearly)
plus add a bench and unittest for it.



git-svn-id: http://skia.googlecode.com/svn/trunk@3989 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-17 14:28:11 +00:00
bungeman@google.com
a02bc1519c WeakRefCnt
http://codereview.appspot.com/5649046/


git-svn-id: http://skia.googlecode.com/svn/trunk@3978 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-16 18:21:56 +00:00
reed@google.com
7b463acd46 speedup SkRect::isFinite() (almost 2x)
add SkRect:set(p0, p1) for quick bounds of 2 points



git-svn-id: http://skia.googlecode.com/svn/trunk@3967 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-16 13:35:36 +00:00
robertphillips@google.com
6623fcd1ee Convert AAClipCache's GrRects to GrIRects
http://codereview.appspot.com/6210057/



git-svn-id: http://skia.googlecode.com/svn/trunk@3942 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 16:47:23 +00:00
reed@google.com
415e76a760 fix Fixed build
git-svn-id: http://skia.googlecode.com/svn/trunk@3937 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 14:32:42 +00:00
reed@google.com
30d90ebe7c Use x*0 instead of x!=x to detect non-finite values, since x*0 also detects infinities
and it is faster (at least faster in SkRect::set).

Add unittest for SkRect::set to see that it correctly detects NaN and infinities.




git-svn-id: http://skia.googlecode.com/svn/trunk@3936 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-15 14:17:36 +00:00
robertphillips@google.com
706f6212c6 Fixes for Windows Release compiler complaints (overflow in const arith)
http://codereview.appspot.com/6210056/



git-svn-id: http://skia.googlecode.com/svn/trunk@3926 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-14 17:51:23 +00:00
robertphillips@google.com
4debcac8c3 Debug Windows compiler complaint fixes
http://codereview.appspot.com/6208055/



git-svn-id: http://skia.googlecode.com/svn/trunk@3924 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-14 16:33:36 +00:00
bungeman@google.com
5548752100 Add bench and test for SkRefCnt.
http://codereview.appspot.com/6195071/

This also adds a cross platform SkThread for testing purposes.


git-svn-id: http://skia.googlecode.com/svn/trunk@3921 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-14 14:09:24 +00:00
robertphillips@google.com
f105b10926 Made clip mask cache use Scratch Texture system
http://codereview.appspot.com/6210044/



git-svn-id: http://skia.googlecode.com/svn/trunk@3920 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-14 12:18:26 +00:00
reed@google.com
18c464b460 update the nearly_integral calculation to be (a) faster, and (b) to correctly
identify that the AA granularity is 1/4 of a pixel, not 1/16 (along an axis).



git-svn-id: http://skia.googlecode.com/svn/trunk@3919 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-11 20:57:25 +00:00
robertphillips@google.com
f21c704119 fix for r3903 compilation issue
git-svn-id: http://skia.googlecode.com/svn/trunk@3904 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-11 13:01:16 +00:00
robertphillips@google.com
8fff356c85 Made clip mask cache reuse depend on mask size/bounds (instead of render target size)
http://codereview.appspot.com/6190067/



git-svn-id: http://skia.googlecode.com/svn/trunk@3903 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-11 12:53:50 +00:00
robertphillips@google.com
d82f3fae92 Fix for Android ClipCache unit test crash
http://codereview.appspot.com/6199063/



git-svn-id: http://skia.googlecode.com/svn/trunk@3902 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-10 21:26:48 +00:00
robertphillips@google.com
50b8eadb9f Reverting r3898 due to Android failures
git-svn-id: http://skia.googlecode.com/svn/trunk@3900 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-10 16:17:58 +00:00