Commit Graph

1149 Commits

Author SHA1 Message Date
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
vandebo@chromium.org
238be8c7e5 [PDF] Add link annotations.
Review URL: https://codereview.appspot.com/6346100

git-svn-id: http://skia.googlecode.com/svn/trunk@4609 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-13 20:06:02 +00:00
tomhudson@google.com
e742bf0ab1 Start removing calls to GrDrawState::setTexture() (and GrPaint::setTexture()?) when there's
a GrSingleTextureEffect involved holding the texture.

http://codereview.appspot.com/6353094/



git-svn-id: http://skia.googlecode.com/svn/trunk@4608 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-13 19:54:19 +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
robertphillips@google.com
56c79b1037 Added GrContext::AutoClipStack to encapsulate setting\resetting of clip stack
http://codereview.appspot.com/6343097/



git-svn-id: http://skia.googlecode.com/svn/trunk@4558 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 20:57:46 +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
robertphillips@google.com
fea85ac3e3 Minor refactoring to make GrAutoMatrix a nested sub-class of GrContext
http://codereview.appspot.com/6356092/



git-svn-id: http://skia.googlecode.com/svn/trunk@4549 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 18:53:23 +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
robertphillips@google.com
3e11c0bd92 Forced GrClip to always have conservative bounds
http://codereview.appspot.com/6353089/



git-svn-id: http://skia.googlecode.com/svn/trunk@4545 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 18:20:35 +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
bungeman@google.com
37946b5b2e Move animated view headers to correct directory.
git-svn-id: http://skia.googlecode.com/svn/trunk@4524 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 21:54:31 +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
tomhudson@google.com
2c026196e7 Fix misnamed function in explanatory comment.
http://codereview.appspot.com/6387043/



git-svn-id: http://skia.googlecode.com/svn/trunk@4489 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 19:07:41 +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
tomhudson@google.com
1dcfa1fcbd Fix definition of isEqual() for two gradient effect custom stages.
Expand comments defining isEqual() to better distinguish equality from
equivalence, which is more significant in Ganesh shader cache management.

http://codereview.appspot.com/6379043/



git-svn-id: http://skia.googlecode.com/svn/trunk@4484 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 18:21:28 +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
senorblanco@chromium.org
bdb1ec453a Minor cleanup in lighting image filters: Made the light color a member of the
light, rather than the filter, so computation is localized.  Changed a couple
of non-const refs in the image filter creation API const refs.  Changed "const
SkColor&" to "SkColor", since it's just a uint32_t anyway.

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


git-svn-id: http://skia.googlecode.com/svn/trunk@4466 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 14:29:51 +00:00
reed@google.com
b158a82bc1 fix 64bit warnings (use: GYP_DEFINES=skia_arch_width=64 make ... )
git-svn-id: http://skia.googlecode.com/svn/trunk@4464 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 13:13:23 +00:00
reed@google.com
00aad94f01 define SK_CPU_SSE_LEVEL to a min of SSE2 if we're on 64bit x86
git-svn-id: http://skia.googlecode.com/svn/trunk@4463 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-09 13:02:35 +00:00
reed@google.com
88db9ef0cd add SkChecksum as a static class, for the replacement API
after this lands, plan to deprecate/remove the older APIs
Review URL: https://codereview.appspot.com/6356059

git-svn-id: http://skia.googlecode.com/svn/trunk@4457 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-03 19:44:20 +00:00
robertphillips@google.com
54823c227d Rolling back r4034 (Proposed plumbing to propagate save & restore)
http://codereview.appspot.com/6346066/



git-svn-id: http://skia.googlecode.com/svn/trunk@4456 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-03 19:12:29 +00:00
bsalomon@google.com
44f7c4a6f8 Make SkTSearch variants with compare func as template param
Review URL: https://codereview.appspot.com/6345060/



git-svn-id: http://skia.googlecode.com/svn/trunk@4449 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-03 15:03:10 +00:00
rileya@google.com
3e33258cd1 Added GPU implementation of 2-point conical gradient.
Review URL: https://codereview.appspot.com/6354062

git-svn-id: http://skia.googlecode.com/svn/trunk@4442 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-03 13:43:35 +00:00
reed@google.com
8dbd5725c0 normalize names for SSE levels
git-svn-id: http://skia.googlecode.com/svn/trunk@4440 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-03 12:08:39 +00:00
mike@reedtribe.org
a2a95f9def experimental hittest for paths (incomplete)
git-svn-id: http://skia.googlecode.com/svn/trunk@4437 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-03 02:35:36 +00:00
reed@google.com
fd59d12000 change NewWithCString to allocate room for the terminating NULL, so the data
can be treated as a cstring (duh).



git-svn-id: http://skia.googlecode.com/svn/trunk@4430 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-02 20:28:31 +00:00
reed@google.com
2e07942f42 add read/write SkData methods
git-svn-id: http://skia.googlecode.com/svn/trunk@4427 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-02 19:35:13 +00:00
reed@google.com
126b4362be detect SSE level in visual studio
git-svn-id: http://skia.googlecode.com/svn/trunk@4424 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-02 19:00:27 +00:00
reed@google.com
5ccbe38285 undo accidental checkin
git-svn-id: http://skia.googlecode.com/svn/trunk@4422 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-02 17:29:44 +00:00
reed@google.com
ab69788571 create symbols for the various SSE values
add GCC check for SSSE3, and assume it is ordered SSE3 < SSSE3 < SSE4



git-svn-id: http://skia.googlecode.com/svn/trunk@4421 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-02 17:27:51 +00:00
reed@google.com
4a2cb30acc add SK_CPU_SSE_LEVEL, which may be defined to 2 or 3 (or 41 or 42 in the future)
to tell us at compile-time what SSE instructions are available. If none are
known to be available (though we still can check at runtime) SK_CPU_SSE_LEVEL
will be undefined.




git-svn-id: http://skia.googlecode.com/svn/trunk@4419 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-02 14:36:37 +00:00
robertphillips@google.com
41efe04af9 Partially rolled forward the SkGrPixelRef changes
http://codereview.appspot.com/6354060/



git-svn-id: http://skia.googlecode.com/svn/trunk@4415 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-29 20:55:14 +00:00
tomhudson@google.com
375ff85e96 Un-trifurcate GrTextContext: get rid of Default and Batched subclasses,
folding their functionality back into the base class.

Requires gyp changes.

http://codereview.appspot.com/6357048/



git-svn-id: http://skia.googlecode.com/svn/trunk@4411 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-29 18:37:57 +00:00
robertphillips@google.com
ecf1f3299a Temporarily readding SkGrTexturePixelRef.h/.cpp until WebKit is transitioned to SkGrPixelRef
git-svn-id: http://skia.googlecode.com/svn/trunk@4401 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-28 21:59:38 +00:00
robertphillips@google.com
23579275c7 Fixed memory deletion error in instance counting mechanism
http://codereview.appspot.com/6344057/



git-svn-id: http://skia.googlecode.com/svn/trunk@4399 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-28 21:30:45 +00:00
robertphillips@google.com
5088eb49fe Moved SkGrTexturePixelRef to SkGrPixelRef
http://codereview.appspot.com/6344054/



git-svn-id: http://skia.googlecode.com/svn/trunk@4397 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-28 20:59:13 +00:00