Commit Graph

725 Commits

Author SHA1 Message Date
djsollen@google.com
c84b8335ee Reapply "Remove Bitmaps Raw Pixel Support."
This CL reapplies r4722. Now that we have addressed the issues
in Chrome tests that were causing asserts to be fired.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4804 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-27 13:41:44 +00:00
bsalomon@google.com
1448cf8cb6 Specialize SkAutoTUnref on const T so that operator -> works.
Review URL: http://codereview.appspot.com/6450054/




git-svn-id: http://skia.googlecode.com/svn/trunk@4802 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-27 13:27:35 +00:00
robertphillips@google.com
fc91dc7004 Windows compiler complaint cleanup
http://codereview.appspot.com/6441055/



git-svn-id: http://skia.googlecode.com/svn/trunk@4796 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-26 21:18:31 +00:00
robertphillips@google.com
cc6493bbef Added ctor to SkClipStack and isEmpty method
http://codereview.appspot.com/6444048/



git-svn-id: http://skia.googlecode.com/svn/trunk@4787 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-26 18:39:13 +00:00
reed@google.com
0bb18bb264 explicitly track if a path is finite or not
we need this (it appears) so we can definitively reject non-finite paths
in canvas, before passing them down into the guts.
Review URL: https://codereview.appspot.com/6453047

git-svn-id: http://skia.googlecode.com/svn/trunk@4784 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-26 15:20:36 +00:00
djsollen@google.com
56f8f338b6 Revert "Remove Bitmaps Raw Pixel Support."
BUG=
TEST=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4780 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-26 14:48:52 +00:00
george@mozilla.com
ece0100c22 Fix SK_OVERRIDE for various versions of clang
BUG=
TEST=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4765 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 19:05:43 +00:00
george@mozilla.com
79c865a5c8 Ensure that all GNU-based systems are considered to be UNIX
Original Mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=749533

R=reed1
BUG=
TEST=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4763 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 18:52:56 +00:00
rileya@google.com
91f319c5dc Use asNewCustomStage instead of asABitmap in SkGpuDevice, also removed now-unecessary twoPointRadialParams parameter from asABitmap.
In SkGpuDevice we still fall back on using asABitmap for effects that don't have asNewCustomStage implemented, but it still simplifies things a fair amount.
Review URL: https://codereview.appspot.com/6430060

git-svn-id: http://skia.googlecode.com/svn/trunk@4755 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 17:18:31 +00:00
bungeman@google.com
0567f222b9 Add SkScalarPow.
git-svn-id: http://skia.googlecode.com/svn/trunk@4754 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 17:00:47 +00:00
reed@google.com
bba65d9a5e experimental only
git-svn-id: http://skia.googlecode.com/svn/trunk@4748 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 14:42:15 +00:00
robertphillips@google.com
4c2a2f7c5e Added isIntersectionOfRects to SkClipStack
http://codereview.appspot.com/6434050/



git-svn-id: http://skia.googlecode.com/svn/trunk@4745 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 22:07:50 +00:00
bungeman@google.com
6e502fe067 Fix Android build broken due to changes in r4741.
git-svn-id: http://skia.googlecode.com/svn/trunk@4743 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 21:18:54 +00:00
bungeman@google.com
bbe5013141 Split SkGlyph into its own header.
https://codereview.appspot.com/6434049/


git-svn-id: http://skia.googlecode.com/svn/trunk@4741 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 20:33:21 +00:00
robertphillips@google.com
607fe077c8 Added bound computation to SkClipStack
http://codereview.appspot.com/6419048/

This will require re-baselining of complexclip* and filltypespersp



git-svn-id: http://skia.googlecode.com/svn/trunk@4730 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 13:54:00 +00:00
djsollen@google.com
c1d1f414a0 Remove Bitmaps Raw Pixel Support.
bitmap.setPixels(...) now creates a mutable pixelRef instead
of just setting fPixels.
Review URL: https://codereview.appspot.com/6419044

git-svn-id: http://skia.googlecode.com/svn/trunk@4722 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-23 16:54:30 +00:00
reed@google.com
f79430350d add protected method for internal_dispose overrides to jam fRefCnt before
calling destructor.

move SkTRefArray to actually inherit from SkRefCnt
Review URL: https://codereview.appspot.com/6422057

git-svn-id: http://skia.googlecode.com/svn/trunk@4719 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-23 14:50:38 +00:00
rileya@google.com
03c1c359b3 Added asNewCustomStage to SkShader and implemented it for all the gradient shaders.
Not actually hooked up yet, but it should be ready to replace asABitmap for a future CL.
Review URL: https://codereview.appspot.com/6351113

git-svn-id: http://skia.googlecode.com/svn/trunk@4702 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-20 20:02:43 +00:00
robertphillips@google.com
80214e26c5 Made clarifying renamings to SkClipStack's iterators (and added to unit test)
http://codereview.appspot.com/6423051/



git-svn-id: http://skia.googlecode.com/svn/trunk@4692 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-20 15:33:18 +00:00
reed@google.com
73c48f1713 removing trailing ',' on last entry in enum, to fix warning
git-svn-id: http://skia.googlecode.com/svn/trunk@4686 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-20 11:35:40 +00:00
reed@google.com
ca0062ee5e add SkPaint::getPosTextPath(), with gm to test it
Review URL: https://codereview.appspot.com/6427055

git-svn-id: http://skia.googlecode.com/svn/trunk@4684 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-20 11:20:32 +00:00
rileya@google.com
22e57f9916 New subclasses for both Gr and GrGL gradient effect classes.
This replaces GrSingleTextureEffect as the base for gradient effects (so we'll be able to do gradient effects without textures), and adds a base class to the GL gradient custom stage implementations (which will soon handle generating the appropriate code to pass colors in and lerp instead of using a cached texture for simpler gradient cases).

Also added a custom stage for linear gradients.
Review URL: https://codereview.appspot.com/6426049

git-svn-id: http://skia.googlecode.com/svn/trunk@4674 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-19 15:16:19 +00:00
vandebo@chromium.org
7f1ffa6b42 Add SK_API for SkData. Needed for https://bugs.webkit.org/show_bug.cgi?id=91171
Review URL: https://codereview.appspot.com/6420047

git-svn-id: http://skia.googlecode.com/svn/trunk@4658 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-18 18:53:28 +00:00
robertphillips@google.com
5836b6dec5 Add skipToLast method to SkClipStack
http://codereview.appspot.com/6411043/



git-svn-id: http://skia.googlecode.com/svn/trunk@4644 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-18 12:06:15 +00:00
alokp@chromium.org
f7751ae229 Exported SkFILEWStream class so that it can be used in Chrome.
Review URL: https://codereview.appspot.com/6409052

git-svn-id: http://skia.googlecode.com/svn/trunk@4643 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-17 19:10:36 +00:00
reed@google.com
e9fdfb545d remove Symbian (not needed) flag, and assume all CPUs *except* thumb have fast
conditional instructions.



git-svn-id: http://skia.googlecode.com/svn/trunk@4635 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-17 12:13:56 +00:00
robertphillips@google.com
52cb2c7cdf Extended SkDeque's reverse iteration capability to SkClipStack
http://codereview.appspot.com/6409046/



git-svn-id: http://skia.googlecode.com/svn/trunk@4631 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-16 18:52:29 +00:00
robertphillips@google.com
0a78b0f4a2 Refactor SkDeque's iterator and allocation method
http://codereview.appspot.com/6353098/



git-svn-id: http://skia.googlecode.com/svn/trunk@4624 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-16 16:58:49 +00:00
scroggo@google.com
50ccb0a738 Add a skia method to perform an atomic add.
Complements sk_atomic_inc for when you want to increase by more than one.

This time, use the correct atomic add function on Windows.

Reviewed at https://codereview.appspot.com/6399050/

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4623 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-16 16:51:28 +00:00
scroggo@google.com
96cbd2c4d2 Revert "Add a method to atomic add."
This reverts commit eb539cf92f487daf9567ffbbba6b6653406d43ae.

BUG=
TEST=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4615 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-16 13:22:56 +00:00
scroggo@google.com
e3f84f3911 Add a skia method to perform an atomic add.
Complements sk_atomic_inc for when you want to increase by more than one.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4614 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-16 13:13:29 +00:00
robertphillips@google.com
40a1ae4df2 Added SkDevice onAttachToCanvas & onDetachFromCanvas methods
http://codereview.appspot.com/6348100/



git-svn-id: http://skia.googlecode.com/svn/trunk@4598 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-13 15:36:15 +00:00
epoger@google.com
af07d065d1 Add SkTDArray.contains(), which is just a wrapper around find()
Review URL: https://codereview.appspot.com/6349103

git-svn-id: http://skia.googlecode.com/svn/trunk@4595 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-13 14:53:18 +00:00
bsalomon@google.com
fd4c00eb36 Fix SkMatrix.h line endings (LF) [change 4592 fixed the cpp]
git-svn-id: http://skia.googlecode.com/svn/trunk@4594 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-13 14:39:51 +00:00
tomhudson@google.com
d0c1a06cb9 Introduces new SingleTextureEffect base class for GrCustomStage objects.
This class tracks the texture that the object uses. A future commit will get rid of the
GrTexture pointer currenty stored in the GrDrawState, allowing us to have CustomStages
*without* textures.

Requires gyp change on next roll.

http://codereview.appspot.com/6306097/



git-svn-id: http://skia.googlecode.com/svn/trunk@4576 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-12 17:23:52 +00:00
junov@chromium.org
02662b7feb Fixing bad assertion test that was trippin-up debug buildbots
TBR=http://codereview.appspot.com/6344109



git-svn-id: http://skia.googlecode.com/svn/trunk@4569 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-12 14:44:52 +00:00
junov@chromium.org
6fc5699e77 Fixing type mask computation in SkMatrix to make it faster and make it so that matrices have the same type masks as their inverses.
This patch also add bench tests that call invert() followed by mapRect() on various types of matrices.  Performance of these tests was greatly affected by typemask computation

Review URL: http://codereview.appspot.com/6380043/
BUG=https://code.google.com/p/chromium/issues/detail?id=135259



git-svn-id: http://skia.googlecode.com/svn/trunk@4562 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-12 14:01:32 +00:00
reed@google.com
b0a34d80c5 idea: add annotation to SkPaint
Review URL: https://codereview.appspot.com/6355050

git-svn-id: http://skia.googlecode.com/svn/trunk@4555 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 19:57:55 +00:00
reed@google.com
19393dff0c add flatten/unflatten to SkDataSet
Review URL: https://codereview.appspot.com/6374057

git-svn-id: http://skia.googlecode.com/svn/trunk@4548 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 18:48:37 +00:00
reed@google.com
91bd45967c add SkDataSet class, so SkAnnotation can be more immutable-like
Review URL: https://codereview.appspot.com/6354091

git-svn-id: http://skia.googlecode.com/svn/trunk@4542 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 17:24:49 +00:00
senorblanco@chromium.org
894790d77c This patch implements the diffuse and specular lighting filters in Ganesh.
There are three light types for each:  distant, point and spot, whose code
generation lives in a GrGLLight class hierarchy.  This similar to the CPU
implementation, where each light type provides a function to compute the vector
from the surface plane to the light (surfaceToLight) and to compute the light
colour (emitLightColour).  Instead of templated member functions, as in the CPU
implementation, these are virtual functions to emit the light-specific GLSL
code.

All of the code for the GPU path lives in the same file as that for the CPU
path, SkLightingImageFilter.cpp.  In order to provide Ganesh a hook to access
it, SkImageFilter now has a asNewCustomStage() virtual, which allows an image
filter to return a GrCustomStage representing that filter.

Note that this patch does not handle the border conditions correctly (the
[top|bottom][Left|Right]Normal() functions in the CPU implementation).  That
will come in a future patch.

Review URL: http://codereview.appspot.com/6345081/



git-svn-id: http://skia.googlecode.com/svn/trunk@4535 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 16:01:22 +00:00
bsalomon@google.com
3a52d68b40 Revert SkNO_RETURN_HINT fix in favor of a simpler fix
git-svn-id: http://skia.googlecode.com/svn/trunk@4529 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 13:30:08 +00:00
bsalomon@google.com
22f0761d78 Fix SkNO_RETURN_HINT warnings on mac/clang
Review URL: http://codereview.appspot.com/6392048/



git-svn-id: http://skia.googlecode.com/svn/trunk@4528 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 12:52:04 +00:00
mike@reedtribe.org
bad1b2ff1d add SkPath::contains(x, y)
git-svn-id: http://skia.googlecode.com/svn/trunk@4526 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 01:51:33 +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
tomhudson@google.com
c377baf406 Add placement new macros to SkPostConfig, call SkNEW* from Ganesh.
TODO: unify with the placement new implementation in SkTemplatesPriv.h,
once various issues there are overcome. reed@ should be taking the lead
there.

http://codereview.appspot.com/6384043/



git-svn-id: http://skia.googlecode.com/svn/trunk@4492 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 20:17:56 +00:00
senorblanco@chromium.org
3a67a668db Add an SK_PRINTF_LIKE macro, which declares a function to have printf-like
semantics, allowing gcc and clang to check the format string against the
arguments.  Enable its use on SkString (printf, appendf, and prependf).  Also
define an SK_SIZE_T_SPECIFIER macro so there's a cross-platform way of
printing a size_t.

Review URL:  http://codereview.appspot.com/6375043/



git-svn-id: http://skia.googlecode.com/svn/trunk@4485 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 18:22:08 +00:00
reed@google.com
142e1fe7cf restore 4478 w/ fixed assert (no long need 8-byte alignment)
git-svn-id: http://skia.googlecode.com/svn/trunk@4480 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 17:44:44 +00:00
reed@google.com
fc8581b2d8 revert 4478
git-svn-id: http://skia.googlecode.com/svn/trunk@4479 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 17:40:48 +00:00
reed@google.com
f8affe5adf switch callers to SkChecksum::Compute (no 32/64 preference)
Review URL: https://codereview.appspot.com/6377043

git-svn-id: http://skia.googlecode.com/svn/trunk@4478 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 17:05:51 +00:00