Commit Graph

1181 Commits

Author SHA1 Message Date
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