Commit Graph

1336 Commits

Author SHA1 Message Date
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
tomhudson@google.com
dcba4c2cc3 Use GrMemoryPool to manage GrCustomStage allocations.
Improve memory reclamation of GrMemoryPool for new/delete/new/delete pattern.

http://codereview.appspot.com/6438046/



git-svn-id: http://skia.googlecode.com/svn/trunk@4744 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 21:36:16 +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
bungeman@google.com
0eec2d0486 Remove SkSfntUtils, as it is not longer used.
git-svn-id: http://skia.googlecode.com/svn/trunk@4735 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 17:50:25 +00:00
bungeman@google.com
aa8483b49d SkSfntUtils should use public types.
git-svn-id: http://skia.googlecode.com/svn/trunk@4734 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 17:34:41 +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
robertphillips@google.com
a6f11c4f71 Gave GrClip an SkClipStack-style iterator
http://codereview.appspot.com/6434046/



git-svn-id: http://skia.googlecode.com/svn/trunk@4723 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-23 17:39:44 +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
junov@chromium.org
8317e17448 Response to post-commit review comments on r4714
Correcting formatting and adding const in SkDeferredCanvas.h
Unreviewed



git-svn-id: http://skia.googlecode.com/svn/trunk@4718 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-23 14:17:45 +00:00
junov@chromium.org
bfeddae9da Fix unbound memory consumption problem with run away deferred canvases.
With this CL, deferred canvases will trigger a flush when then the 
memory allocated for recording commands (including flattened objects)
exceeds 64MB.

TEST=DeferredCanvas skia unit test, test step TestDeferredCanvasMemoryLimit
BUG=http://code.google.com/p/chromium/issues/detail?id=137884
Review URL: https://codereview.appspot.com/6425053

git-svn-id: http://skia.googlecode.com/svn/trunk@4714 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-23 13:35:14 +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
junov@chromium.org
8e1678ff9e Reverting r4695
git-svn-id: http://skia.googlecode.com/svn/trunk@4697 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-20 18:32:39 +00:00
junov@chromium.org
278de8b3b3 Try turning on the SkGPipe path in SkDeferredCanvas
Unreviewed



git-svn-id: http://skia.googlecode.com/svn/trunk@4695 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-20 18:00:59 +00:00
tomhudson@google.com
1e8f016305 Remove easily-removable uses of setTexture(), instead creating a GrSingleTextureEffect -
where feasible, through convenience function on GrDrawState.

http://codereview.appspot.com/6425055/



git-svn-id: http://skia.googlecode.com/svn/trunk@4694 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-20 16:25:18 +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
bsalomon@google.com
e3d3216fe1 Remove stage masks
Review URL: http://codereview.appspot.com/6422047/



git-svn-id: http://skia.googlecode.com/svn/trunk@4688 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-20 13:37:06 +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
junov@chromium.org
6a0d010e2d Fixing heap corruption issue in deferred canvas when using SkGPipe.
Swapping the declaration order of fPipeController and fPipeWriter to
make sure that the writer is destroyed first before the controller.
Review URL: https://codereview.appspot.com/6427054

git-svn-id: http://skia.googlecode.com/svn/trunk@4682 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-19 21:00:07 +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
rileya@google.com
24f3ad1bbb Move texture lock/unlock functions from SkGpuDevice into SkGr as global functions, also removed inconsistent "SkGr" class.
Review URL: https://codereview.appspot.com/6420048

git-svn-id: http://skia.googlecode.com/svn/trunk@4664 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-18 21:47:40 +00:00
twiz@google.com
5807116946 This CL implements the Ganesh path for the SkTable_ColorFilter color transformation.
A new texture stage dedicated to color transforms has been added, along with the new custom stage implementing the LUT.
Review URL: https://codereview.appspot.com/6351081

git-svn-id: http://skia.googlecode.com/svn/trunk@4663 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-18 21:41:50 +00:00
senorblanco@chromium.org
1e95d715d0 Clean up the use of AutoScratchTexture in the gaussian blur and morphology
filters.  Instead of passing in AutoScratchTextures for temporaries, we allocate
them inside the function and detach() after rendering.  Since the functions now
return a ref()'ed texture, we no longer ref() the result in filter_texture().

Also, the imageblur gm was passing a paint with an image filter both to
saveLayer()/restore(), and to every text draw call.  Back when only restore()
was applying filters, this was fine, but since we're now applying filters on all
draw calls, this means we're double-blurring in this GM.

I've reverted the Mac baselines for the imageblur GM to their previous versions;
hopefully this will be correct.



git-svn-id: http://skia.googlecode.com/svn/trunk@4659 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-18 19:52:53 +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
junov@chromium.org
77eec248cb Refactoring SkDeferredCanvas to use SkGPipe.
Keeping the refactor hidden behind a config macro for now.

TEST=covered by existing skia gm tests
BUG=https://code.google.com/p/chromium/issues/detail?id=133432
Review URL: https://codereview.appspot.com/6405054

git-svn-id: http://skia.googlecode.com/svn/trunk@4656 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-18 17:54:45 +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
tomhudson@google.com
2f68e7684b Move texture domains onto a GrCustomStage, off of GrSamplerState.
This will require gyp changes to roll into Chrome.

http://codereview.appspot.com/6405050/



git-svn-id: http://skia.googlecode.com/svn/trunk@4641 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-17 18:43:21 +00:00
scroggo@google.com
284bf502c0 Purge bitmaps from SkGPipe's shared heap.
BitmapInfo:
Now in SkGPipePriv so it can be accessed by SkGPipeRead.

Add the ability to essentially ref count BitmapInfos so that they can
be purged to make room in the shared heap for a new one.

SkGPipeWrite:
Purge the least recently used bitmap if it has already been drawn by
all readers.

SkGPipeRead:
Read the BitmapInfo (instead of the SkBitmap) and decrement its count
after drawing.

SkGPipeController:
Added a method to tell how many readers will be used, so that when
purging bitmaps each reader can be accounted for.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4638 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-17 16:10:34 +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
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
robertphillips@google.com
d881bc194d Collapsed SkGrTexturePixelRef and SkGrRenderTargetPixelRef into SkGrPixelRef using new GrSurface class
http://codereview.appspot.com/6359045/



git-svn-id: http://skia.googlecode.com/svn/trunk@4396 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-28 20:02:39 +00:00
bsalomon@google.com
ded4f4b163 Initial support for GL_NV_path_renering. Experimental, there are still some issues to resolve, set gyp variable skia_nv_path_rendering=1 or build flag GR_GL_USE_NV_PATH_RENDERING to enable.
http://codereview.appspot.com/6349049/



git-svn-id: http://skia.googlecode.com/svn/trunk@4390 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-28 18:48:06 +00:00
scroggo@google.com
565254bc93 Fix SkGPipe drawing, and turn it on by default.
A recent change broke SkGPipe. Fix it, and turn on pipe drawing
in GM by default so we will catch these in the future.

We already had a bug where SkGPipeWriter had to use its Cross Process
flag to work, so for a quick fix, force the reader to use the Cross
Process flag as well. The bug to allow both cross and non cross process
is http://code.google.com/p/skia/issues/detail?id=663

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4384 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-28 15:41:32 +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
fffc8d01b5 Added EOF marker to address clang++ error
git-svn-id: http://skia.googlecode.com/svn/trunk@4381 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-28 00:29:23 +00:00
junov@chromium.org
ef76060cbf Adding checksum to SkFlatData to accelerate SkPicture recording.
The checksum triggers an early exit in the mem compare use to search for duplicate flattened objects. Also, call to memcmp was replaced with 64-bit at a time comparison loop.

Review URL: http://codereview.appspot.com/6339046/
BUG=http://code.google.com/p/chromium/issues/detail?id=54079
TEST=Checksum and PictureRecord tests in bench.exe



git-svn-id: http://skia.googlecode.com/svn/trunk@4378 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-27 20:03:16 +00:00
robertphillips@google.com
97fafe1b5e Altered SkInstCnt to print out atexit
http://codereview.appspot.com/6348043/



git-svn-id: http://skia.googlecode.com/svn/trunk@4377 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-27 19:52:20 +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
reed@google.com
c6faa5a0c4 add SkAlign8 and SkIsAlign8 macros
git-svn-id: http://skia.googlecode.com/svn/trunk@4362 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-27 15:07:11 +00:00
robertphillips@google.com
0456e0b7b8 Added Inst counting to SkFlattenable-derived classes
http://codereview.appspot.com/6355043/



git-svn-id: http://skia.googlecode.com/svn/trunk@4359 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-27 14:03:26 +00:00
reed@google.com
fa35e3ddcc plumb SkInstCnt to all subclasses of GrRefCnt
git-svn-id: http://skia.googlecode.com/svn/trunk@4353 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-26 20:16:17 +00:00
reed@google.com
563a3b4102 more SkInstCnt plumbing
fix some typeface leaks



git-svn-id: http://skia.googlecode.com/svn/trunk@4348 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-26 19:24:50 +00:00
reed@google.com
73e19fb1ba show # of unknown subclasses in dump
git-svn-id: http://skia.googlecode.com/svn/trunk@4347 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-26 18:58:03 +00:00
reed@google.com
fcb57b5570 more SkInstCnt plumbing
git-svn-id: http://skia.googlecode.com/svn/trunk@4344 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-26 17:55:30 +00:00
reed@google.com
82ce2b8afb add more SkInstCnt plumbing
git-svn-id: http://skia.googlecode.com/svn/trunk@4343 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-26 17:43:26 +00:00
reed@google.com
3b42998466 stick SkInstCnt in more classes, to help track down leaks
git-svn-id: http://skia.googlecode.com/svn/trunk@4341 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-26 15:30:08 +00:00
djsollen@google.com
0833777df1 Cleanup flattening code to properly serialize lighting image filters.
Review URL: https://codereview.appspot.com/6333070

git-svn-id: http://skia.googlecode.com/svn/trunk@4340 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-26 14:33:13 +00:00
tomhudson@google.com
f13f588046 Add GrPaint::*StageEnabled() and GrDrawState::stageEnabled() functions.
These wrap the question of "is this stage of the shader enabled?" so that
we can change the semantics - previously iff there was a texture, now
if there is a texture OR a GrCustomStage, soon (post-cl 6306097) iff there
is a GrCustomStage, which at that point will hold whatever texture is
necessary.

http://codereview.appspot.com/6306104/



git-svn-id: http://skia.googlecode.com/svn/trunk@4325 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-25 17:27:28 +00:00
reed@google.com
34342f6f51 export flags on the state of the world when a picture was serialized.
e.g. don't read/write functionptrs in that case (sizeof may be different for one)
Review URL: https://codereview.appspot.com/6331050

git-svn-id: http://skia.googlecode.com/svn/trunk@4318 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-25 14:36:28 +00:00
djsollen@google.com
5df2a99861 [android] Add an API to load customized font config for testing.
When running WebKit layout tests, we need to load some fonts from Linux to
match baselines of chromium linux. However, font config file is
hard-coded in Skia now. This change add an API to customize font config
in skia.

https://codereview.appspot.com/6296067/

git-svn-id: http://skia.googlecode.com/svn/trunk@4316 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-25 13:58:22 +00:00
senorblanco@chromium.org
f49b429cef Raster implementation of diffuse and specular lighting filters. Externally,
the caller instantiates a light (distant, point or spot), and an
SkDiffuseLightingFilter or SkSpecularLightingImageFilter with that light.  A
Sobel edge detection filter is applied to the alpha of the incoming bitmap, and
the result is used as a height map for lighting calculations.

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



git-svn-id: http://skia.googlecode.com/svn/trunk@4314 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-22 21:01:23 +00:00
bsalomon@google.com
07fc0d178e Revert r4287. Large numbers of textures created by random gradients can cause poor driver performance (at least on Mac)
BUG=670



git-svn-id: http://skia.googlecode.com/svn/trunk@4306 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-22 15:15:59 +00:00
robertphillips@google.com
15c0fea699 AutoScratchTexture can now release its texture and it will return to the texture cache when freed
http://codereview.appspot.com/6262043/



git-svn-id: http://skia.googlecode.com/svn/trunk@4301 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-22 12:41:43 +00:00
bsalomon@google.com
5e24129831 Move GrTemplates.h to src
Review URL: http://codereview.appspot.com/6333053/


git-svn-id: http://skia.googlecode.com/svn/trunk@4300 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-22 12:34:22 +00:00
robertphillips@google.com
9ec075366e Altered GrDrawState to always ref texture and render target
http://codereview.appspot.com/6251049/



git-svn-id: http://skia.googlecode.com/svn/trunk@4298 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-22 12:01:30 +00:00
robertphillips@google.com
7d501ab502 Add GrSurface parent class above GrTexture & GrRenderTarget
http://codereview.appspot.com/6297092/



git-svn-id: http://skia.googlecode.com/svn/trunk@4292 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-21 21:09:06 +00:00
robertphillips@google.com
15e9d3e66e Expanded distribution of instance counting
http://codereview.appspot.com/6300114/



git-svn-id: http://skia.googlecode.com/svn/trunk@4291 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-21 20:25:03 +00:00
robertphillips@google.com
c82a8b7aa4 Fixed two bugs in SW-only clip mask generation
http://codereview.appspot.com/6306086/



git-svn-id: http://skia.googlecode.com/svn/trunk@4290 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-21 20:15:48 +00:00
bsalomon@google.com
a320194e42 Make GrClipMaskManager configure the stencil and scissor on GrGpu
Review URL: http://codereview.appspot.com/6308096/



git-svn-id: http://skia.googlecode.com/svn/trunk@4288 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-21 19:58:20 +00:00
bsalomon@google.com
8f7e1dac5c Remove count budget from resource cache
Review URL: http://codereview.appspot.com/6312052/



git-svn-id: http://skia.googlecode.com/svn/trunk@4287 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-21 19:48:32 +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
tomhudson@google.com
50e4ce0552 Fix memory leaks.
http://codereview.appspot.com/6301098/



git-svn-id: http://skia.googlecode.com/svn/trunk@4281 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-19 15:27:50 +00:00
bsalomon@google.com
c0af317331 TLS GrContext count
Review URL: http://codereview.appspot.com/6298077/


git-svn-id: http://skia.googlecode.com/svn/trunk@4262 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-15 14:10:09 +00:00
robertphillips@google.com
f69a11b5c5 Use GrAARectRenderer in GPU AA clip mask generation
http://codereview.appspot.com/6300097/



git-svn-id: http://skia.googlecode.com/svn/trunk@4261 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-15 13:58:07 +00:00
robertphillips@google.com
4d73ac22a1 Version 2 of the Instance Counting system. This one simplifies the print out of information.
http://codereview.appspot.com/6296069/



git-svn-id: http://skia.googlecode.com/svn/trunk@4255 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-13 18:54:08 +00:00
bsalomon@google.com
f22f77faeb NV PR spec update to function param, use GrGL typedefs rather than fundamental types
Review URL: http://codereview.appspot.com/6307077/



git-svn-id: http://skia.googlecode.com/svn/trunk@4245 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-13 14:16:03 +00:00
reed@google.com
9a323c98f6 faster SkScalarIsFinite()
git-svn-id: http://skia.googlecode.com/svn/trunk@4244 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-13 13:03:08 +00:00
robertphillips@google.com
e98ade4fde Added Texture desc to render target
http://codereview.appspot.com/6302068/



git-svn-id: http://skia.googlecode.com/svn/trunk@4243 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-13 12:53:07 +00:00
robertphillips@google.com
4bdfb8c9d6 Compiler complaints + some minor cleanup
http://codereview.appspot.com/6295070/



git-svn-id: http://skia.googlecode.com/svn/trunk@4238 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-12 21:23:49 +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
djsollen@google.com
64a0ec3655 Move SkColorTable into its own header and reduce includes in SkFlattenable.h
Review URL: https://codereview.appspot.com/6299072

git-svn-id: http://skia.googlecode.com/svn/trunk@4236 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-12 15:17:27 +00:00
junov@chromium.org
957ebddce1 Adding API to GrTexture to reset cached texture parameter values
REVIEW=http://codereview.appspot.com/6305084/
BUG=http://code.google.com/p/chromium/issues/detail?id=130925



git-svn-id: http://skia.googlecode.com/svn/trunk@4234 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-12 13:58:36 +00:00
robertphillips@google.com
f6747b0b90 Split GrContext's AA Rect drawing methods into helper class
http://codereview.appspot.com/6300070/



git-svn-id: http://skia.googlecode.com/svn/trunk@4233 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-12 00:32:28 +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
bsalomon@google.com
4151341273 Add SK_API to null canvas create method
git-svn-id: http://skia.googlecode.com/svn/trunk@4221 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-11 15:41:25 +00:00
bsalomon@google.com
19bbd3d02e Null canvas
Review URL: http://codereview.appspot.com/6117051/



git-svn-id: http://skia.googlecode.com/svn/trunk@4220 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-11 15:39:15 +00:00
bsalomon@google.com
0efcc37952 Remove glBlendEquation and glColorPointer
Review URL: http://codereview.appspot.com/6300075/



git-svn-id: http://skia.googlecode.com/svn/trunk@4216 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-08 20:36:22 +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
bsalomon@google.com
f6d3c5aa5f Make SkPath::RawIter require a non-NULL pts pointer.
Review URL: http://codereview.appspot.com/6301060/



git-svn-id: http://skia.googlecode.com/svn/trunk@4206 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-07 17:47:33 +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
scroggo@google.com
72c9672ce2 Add tiled rendering as an option to GM.
Use an SkGPipe to play back drawing into tiles.
This will help us to debug differences in drawing
while tiled.

Pass --tiledPipe to gm to use the tiled pipe.
Review URL: https://codereview.appspot.com/6295050

git-svn-id: http://skia.googlecode.com/svn/trunk@4199 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-06 21:07:10 +00:00
bsalomon@google.com
47059542e7 Search and replace change. Some Gr enum value names didn't have a "Gr" in their suffix.
Verbal LGTM from TomH




git-svn-id: http://skia.googlecode.com/svn/trunk@4198 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-06 20:51:20 +00:00
reed@google.com
cb7be694c3 Add new gradient to support HTML Canvas2D two-point-radial-gradient. Ours is
called (for now at least) TwoPointConical, to distinguish it from the
existing one (TwoPointRadial), and to reflect its odd behavior where it draws
transparent outside the boundary of the "cone" between the two circles.

This impl is unsupported by GPU and Printing at the moment, and Chrome does not
yet invoke it.
Review URL: https://codereview.appspot.com/6299051

git-svn-id: http://skia.googlecode.com/svn/trunk@4197 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-06 20:31:56 +00:00
bsalomon@google.com
9923c2b29a Remove gpu stats tracking
Review URL: http://codereview.appspot.com/6300052/



git-svn-id: http://skia.googlecode.com/svn/trunk@4194 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-06 18:21:18 +00:00
bsalomon@google.com
fe11cb6486 Add GL function pointers for GL_NV_path_rendering
Review URL: http://codereview.appspot.com/6296046/



git-svn-id: http://skia.googlecode.com/svn/trunk@4192 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-06 15:17:54 +00:00
caryclark@google.com
3dd459151f fix warnings on Mac in miscellaneous files
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/6305047

git-svn-id: http://skia.googlecode.com/svn/trunk@4186 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-06 12:11:10 +00:00
caryclark@google.com
cf6285b89b fix warnings on Mac in src/gpu and include/gpu
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/6296044

git-svn-id: http://skia.googlecode.com/svn/trunk@4180 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-06 12:09:01 +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
robertphillips@google.com
25c199343d Reverting r4162
git-svn-id: http://skia.googlecode.com/svn/trunk@4164 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-05 16:24:32 +00:00
robertphillips@google.com
3227ab5f64 Added instance counting system for SkRefCnt-derived objects
http://codereview.appspot.com/6242070/



git-svn-id: http://skia.googlecode.com/svn/trunk@4162 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-05 15:40:54 +00:00
robertphillips@google.com
0090ec7cb0 Fix for compiler error in r4154
git-svn-id: http://skia.googlecode.com/svn/trunk@4155 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-05 13:12:53 +00:00
robertphillips@google.com
941ee9303b Fixed flattening of SkStippleMaskFilter
http://codereview.appspot.com/6279052/



git-svn-id: http://skia.googlecode.com/svn/trunk@4154 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-05 12:55:05 +00:00
bsalomon@google.com
d2ae1fad78 remove 4x4 downsample filter mode
Review URL: http://codereview.appspot.com/6267046/



git-svn-id: http://skia.googlecode.com/svn/trunk@4149 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-04 20:06:02 +00:00
robertphillips@google.com
a1e5795279 GrTexture can now create its own cache key
http://codereview.appspot.com/6269047/



git-svn-id: http://skia.googlecode.com/svn/trunk@4148 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-04 20:05:28 +00:00
tomhudson@google.com
83e5eb8d02 Clean up likely reference leak in Ganesh custom stages.
http://codereview.appspot.com/6286047/



git-svn-id: http://skia.googlecode.com/svn/trunk@4146 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-04 19:58:30 +00:00
reed@google.com
7b6c19392c remove mutable apis on SkColorMatrixFilter, must use constructor.
fix flattening to not write function-ptrs (no go for serialization), so we
store the raw float values now.

Slight change to GM/DRT images for GPU possible. Just rebaseline.
Review URL: https://codereview.appspot.com/6273052

git-svn-id: http://skia.googlecode.com/svn/trunk@4143 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-04 19:07:41 +00:00
reed@google.com
8b0d0f6a9c remove public function-ptr based colorfilter
Review URL: https://codereview.appspot.com/6286046

git-svn-id: http://skia.googlecode.com/svn/trunk@4141 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-04 18:10:33 +00:00
djsollen@google.com
da30999f2b change static variable to #define
git-svn-id: http://skia.googlecode.com/svn/trunk@4138 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-04 14:13:06 +00:00
djsollen@google.com
c6ff3e7a49 Add legacy script to enable skia roll into chromium.
Review URL: https://codereview.appspot.com/6277045

git-svn-id: http://skia.googlecode.com/svn/trunk@4137 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-04 13:39:47 +00:00
robertphillips@google.com
07ef911f18 Fixed Linux compiler complaints
http://codereview.appspot.com/6269045/



git-svn-id: http://skia.googlecode.com/svn/trunk@4135 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-04 13:22:14 +00:00
robertphillips@google.com
3271628342 Move texture descriptor into GrTexture
http://codereview.appspot.com/6258068/



git-svn-id: http://skia.googlecode.com/svn/trunk@4133 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-04 12:48:45 +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
tomhudson@google.com
898e7b568f Flip the switch to turn on GrCustomStage implementation of gradients;
remove old implementation, including enums & state on various structs.

http://codereview.appspot.com/6245078/



git-svn-id: http://skia.googlecode.com/svn/trunk@4129 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-01 20:42:15 +00:00
tomhudson@google.com
0bdbed3802 Fix GrSamplerState::operator=() to take a reference rather than a copy.
Visual review by bsalomon@.



git-svn-id: http://skia.googlecode.com/svn/trunk@4128 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-01 19:50:02 +00:00
bungeman@google.com
04640299dc VC++ allows template parameter shadowing.
git-svn-id: http://skia.googlecode.com/svn/trunk@4127 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-01 19:47:51 +00:00
bungeman@google.com
e70f798ebc Serialize support for GDI.
http://codereview.appspot.com/6263046/



git-svn-id: http://skia.googlecode.com/svn/trunk@4126 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-01 19:38:19 +00:00
tomhudson@google.com
1f90287df3 Punctuation cleanup to satisfy idiosyncracies of OpenBSD gcc 4.2.1.
Original patch by landry.breuil.

http://code.google.com/p/skia/issues/detail?id=626



git-svn-id: http://skia.googlecode.com/svn/trunk@4112 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-01 13:15:47 +00:00
djsollen@google.com
15eeca0068 Update the implementation of SkTypeface_android.h functions.
This CL removes the hardcoded mappings of FallbackScripts to
a particular font file and replaces it with a dynamic mechanism
that takes a style and representative character code for a given
FallbackScript class and returns the most appropriate SkTypeface
that contains that character code.
Review URL: https://codereview.appspot.com/6197074

git-svn-id: http://skia.googlecode.com/svn/trunk@4111 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-01 12:52:26 +00:00
tomhudson@google.com
194de08484 Zero out GrSamplerState in constructor to recover performance loss on Linux from r4102.
(Noise in padding bytes was breaking operator==())
Visual review by bsalomon@.



git-svn-id: http://skia.googlecode.com/svn/trunk@4108 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-31 20:35:27 +00:00
djsollen@google.com
9714516a0d Add SkFontDescriptor for serializing fonts.
Review URL: https://codereview.appspot.com/6250080

git-svn-id: http://skia.googlecode.com/svn/trunk@4106 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-31 19:55:08 +00:00
bsalomon@google.com
b505a128ef Implement morphology as a custom effect
Review URL: http://codereview.appspot.com/6250073/



git-svn-id: http://skia.googlecode.com/svn/trunk@4102 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-31 18:40:36 +00:00
reed@google.com
0d10280190 We often rgn-diff an area >= the other rgn. now we detect that and return empty
We do this when we update our devices in SkCanvas.cpp
Review URL: https://codereview.appspot.com/6249073

git-svn-id: http://skia.googlecode.com/svn/trunk@4101 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-31 18:28:59 +00:00
bsalomon@google.com
4d063dea5e Add glTexParameteriv to GL interface
Comitted on behalf of jin.a.yang@intel.com

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



git-svn-id: http://skia.googlecode.com/svn/trunk@4099 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-31 17:59:23 +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
tomhudson@google.com
67794f5e37 Fix typo in r4092.
git-svn-id: http://skia.googlecode.com/svn/trunk@4094 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-31 14:31:14 +00:00
tomhudson@google.com
111755936d Use element-by-element assignment in GrSamplerState::operator= instead of memcpy
so that we can handle refcounting correctly.

http://codereview.appspot.com/6262049/



git-svn-id: http://skia.googlecode.com/svn/trunk@4092 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-31 14:23:28 +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
digit@google.com
eec9dbcace arm: First step towards dynamic NEON support.
This patch adds minimal support for dynamic ARM NEON support,
i.e. the ability to probe the CPU at runtime for NEON and
provide alternate code paths when it is available.

- Add include/core/SkUtilsArm.h, which declares a few helper
  macros (e.g. SK_NEON_ARM_IS_DYNAMIC), plus the handy
  function 'sk_cpu_arm_has_neon()' which returns true if
  the target CPU supports the ARM NEON instruction set.

  Note that the header is in include/core/ because it will
  have to be included from NEON-specific code under src/code/

  It would probably be more logical to put it under include/opts/
  instead, but this would require moving all the NEON-specific
  stuff under src/code/ into src/opts/, which is not trivial
  due to the way the code is currently architected.

- Add src/core/SkUtilsArm.cpp which implements
  'sk_cpu_arm_has_neon' for ARM-based Linux systems, only
  when SK_NEON_ARM_IS_DYNAMIC is true.

  (For other cases, 'sk_cpu_arm_has_neon' is an inline function
   that returns a constant 'true' or 'false' value).

  There is no user-level accessible CPUID instruction on ARM,
  so do all CPU feature probing by parsing /proc/cpuinfo.
  This is Linux-specific.

  For Debug build types, the CPU probing result is printed
  to the Android log (or Linux command-line) for easier
  debugging.

- Create a new 'opts_neon' target (static library) which shall
  contain all the NEON-specific code paths for the library.

  This is necessary because -mfpu=neon impacts also non-scalar
  code. Just like with -mssse3 on x86, we can't build the rest
  of the library with this flag.

  Note that for now, we only include memset16_neon and
  memset32_neon in this library.

- Modify opts_check_arm.cpp to implement SK_ARM_NEON_IS_DYNAMIC
  properly.

Compared to a 'xoom' build, the only difference is the use of
NEON-optimized memset16/32 functions. Later patches will move
more NEON-specific code paths to 'opts_neon'.
Review URL: https://codereview.appspot.com/6247058

git-svn-id: http://skia.googlecode.com/svn/trunk@4069 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-30 13:54:41 +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
bsalomon@google.com
4196c0e0e8 Fix line ending, mark svn:eol-style LF
git-svn-id: http://skia.googlecode.com/svn/trunk@4060 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-29 19:44:14 +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
mike@reedtribe.org
398b1bcb7d add SkPoint::isZero(), match the existing method on SkIPoint
git-svn-id: http://skia.googlecode.com/svn/trunk@4055 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-29 01:40:15 +00:00
robertphillips@google.com
c077d1eaa8 Rolling back 4053
git-svn-id: http://skia.googlecode.com/svn/trunk@4054 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-28 14:10:15 +00:00
robertphillips@google.com
ab303ef6e8 Speculative fix for Android Debug only crash in r4049
http://codereview.appspot.com/6251049/



git-svn-id: http://skia.googlecode.com/svn/trunk@4053 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-28 13:37:25 +00:00
robertphillips@google.com
ac2c666e27 Rolling back r4049
git-svn-id: http://skia.googlecode.com/svn/trunk@4051 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-25 12:46:55 +00:00
robertphillips@google.com
837576bf89 Altered GrDrawState to always ref textures and render target
http://codereview.appspot.com/6251049/



git-svn-id: http://skia.googlecode.com/svn/trunk@4049 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-25 11:45:40 +00:00
reed@google.com
fd4be26c42 Change patheffect to take a (new) StrokeRec object, which encapsulates the fill
or stroke parameters for a path.

Today, the patheffect only sees if the caller was going to stroke or fill, and
if stroke, it just sees the width. With this change, the effect can see all of the
related parameters (e.g. cap/join/miter). No other change is intended at this
time.

After this change, I hope to use this additional data to allow SkDashPathEffect
to, at times, apply the stroke as part of its effect, which may be much more
efficient than first dashing, and then reading that and stroking it.

Most of these files changed just because of the new parameter to filterPath. The
key changes are in SkPathEffect.[h,cpp], SkPaint.cpp and SkScalerContext.cpp
Review URL: https://codereview.appspot.com/6250051

git-svn-id: http://skia.googlecode.com/svn/trunk@4048 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-25 01:04:12 +00:00
reed@google.com
d3521f1a8d revert 4046 -- GM:pathfill failed on one bot, maybe uninitialized memory somewhere?
git-svn-id: http://skia.googlecode.com/svn/trunk@4047 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-24 20:32:22 +00:00
reed@google.com
9797272edf Change patheffect to take a (new) StrokeRec object, which encapsulates the fill
or stroke parameters for a path.

Today, the patheffect only sees if the caller was going to stroke or fill, and if
stroke, it just sees the width. With this change, the effect can see all of the
related parameters (e.g. cap/join/miter). No other change is intended at this
time.

After this change, I hope to use this additional data to allow SkDashPathEffect
to, at times, apply the stroke as part of its effect, which may be much more
efficient than first dashing, and then reading that and stroking it.

Most of these files changed just because of the new parameter to filterPath. The
key changes are in SkPathEffect.[h,cpp], SkPaint.cpp and SkScalerContext.cpp
Review URL: https://codereview.appspot.com/6249050

git-svn-id: http://skia.googlecode.com/svn/trunk@4046 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-24 20:13:57 +00:00
robertphillips@google.com
72176b2d38 Removed SoftwarePathRenderer from GrContext's path renderer chain
http://codereview.appspot.com/6221065/



git-svn-id: http://skia.googlecode.com/svn/trunk@4036 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-23 13:19:12 +00:00
robertphillips@google.com
49d9fd5fdb Plumbing to propagate save & restore from SkCanvas down to GrContext & lower
http://codereview.appspot.com/6203067/



git-svn-id: http://skia.googlecode.com/svn/trunk@4034 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-23 11:44:08 +00:00
robertphillips@google.com
2c75681e36 Remove GrClipMaskManager's path renderer chain (in favor of GrContext's)
http://codereview.appspot.com/6211078/



git-svn-id: http://skia.googlecode.com/svn/trunk@4032 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-22 20:28:23 +00:00
bsalomon@google.com
16fd21ba22 Rename GrProgramStageFactory::stageKey to GrProgramStageFactory::glStageKey since it is GL-specific
Review URL: http://codereview.appspot.com/6218060/



git-svn-id: http://skia.googlecode.com/svn/trunk@4020 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-21 21:18:13 +00:00
bsalomon@google.com
289efe014a Tunnel name requests through factory, forcing custom effect and custom prog stage to use same impl
Review URL: http://codereview.appspot.com/6220061/



git-svn-id: http://skia.googlecode.com/svn/trunk@4019 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-21 20:57:59 +00:00
reed@google.com
1f1db4cc5b update dox for NewFromMalloc() to clarify ownership
git-svn-id: http://skia.googlecode.com/svn/trunk@4017 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-21 20:00:39 +00:00
bsalomon@google.com
7c4d06de41 Make static const var that is only used in an assert be defined in the debug build only to suppress an unused var warning.
git-svn-id: http://skia.googlecode.com/svn/trunk@4012 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-21 15:31:00 +00:00
bsalomon@google.com
a4d8fc2473 Stop using GrDrawState to track GPU's blend state
git-svn-id: http://skia.googlecode.com/svn/trunk@4007 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-21 13:21:46 +00:00
bsalomon@google.com
8e520fc249 fix build?
git-svn-id: http://skia.googlecode.com/svn/trunk@4004 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-18 20:06:45 +00:00
bsalomon@google.com
ae4f96a9e0 Some refactoring of GrCustomStage and friends
Review URL: http://codereview.appspot.com/6209071/



git-svn-id: http://skia.googlecode.com/svn/trunk@4003 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-18 19:54:48 +00:00
tomhudson@google.com
ffe39bd3b6 Fix type errors and a few warnings for Visual Studio 2010 64-bit build.
We're still far from 64b statically safe, mostly around SkReader32.h
and the address-alignment code in GrTypes.h.
Original code provided by jianliang79.

http://code.google.com/p/skia/issues/detail?id=601



git-svn-id: http://skia.googlecode.com/svn/trunk@3994 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-17 15:38:00 +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