Commit Graph

1209 Commits

Author SHA1 Message Date
bungeman@google.com
9120892268 Const correct BlockRef in SkAutoTUnref.
https://codereview.appspot.com/6448066/


git-svn-id: http://skia.googlecode.com/svn/trunk@4829 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-30 15:03:59 +00:00
bsalomon@google.com
cddaf340f1 Remove GrDrawState::setTexture/getTexture
Review URL: http://codereview.appspot.com/6455051/



git-svn-id: http://skia.googlecode.com/svn/trunk@4826 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-30 13:09:05 +00:00
reed@google.com
79a1c34ee4 land https://codereview.appspot.com/6448046/
Add a method reporting used font cache size to the SkGraphics API



git-svn-id: http://skia.googlecode.com/svn/trunk@4825 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-30 13:08:01 +00:00
reed@google.com
889b09edfe check-point for surface experiment
git-svn-id: http://skia.googlecode.com/svn/trunk@4819 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-27 21:10:42 +00:00
george@mozilla.com
2092c40a0d Add support for ARM without EDSP and ARMv6+
Original Mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=751814

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4818 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-27 21:08:01 +00:00
scroggo@google.com
3cb969f27d In SkGPipe, only serialize SkTypefaces in cross process mode.
Also make SkGPipeController ref the recording canvas to ensure that
objects used by SkGPipeCanvas (e.g. SharedHeap and fTypefaceSet, which
hold references to objects to which pointers are written to the stream)
survive to be played back even if SkGPipeWriter.endRecording() is called.

BUG=
TEST=TypefaceGM

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4817 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-27 20:39:19 +00:00
reed@google.com
f6627b78f9 check-point for image experiment
git-svn-id: http://skia.googlecode.com/svn/trunk@4811 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-27 18:02:50 +00:00
justinlin@google.com
20a550c6ea Add virtual destructor to class with virtual functions.
BUG=
TEST=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4810 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-27 17:37:12 +00:00
djsollen@google.com
7dade42e6f Always store pixels of mutable bitmaps when recording a SkPicture.
Prior to this CL mutable bitmaps only saved a copy of their pixels
if a flag was set at recording time.  That flag has been removed
and the default behavior when recording a mutable bitmap is to
make a copy of it's pixels. This is the only way to ensure that
the pixels are not manipulated before we playback their contents.

However, enabling this behavior breaks the recording of extracted
bitmaps in SkPicture. This is because we currently cache bitmaps
within a picture based only on their pixelRef. This results in
false positive cache hit when drawing an extracted bitmap as it
shares a pixelRef with its orginating bitmap.  Therefore we must
update the index of the bitmap cache to be both the pixelRef AND
the size and offset of the bitmap using those pixels.

BUG=
TEST=extractbitmap.cpp

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4809 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-27 15:58:23 +00:00
djsollen@google.com
c84b8335ee Reapply "Remove Bitmaps Raw Pixel Support."
This CL reapplies r4722. Now that we have addressed the issues
in Chrome tests that were causing asserts to be fired.

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

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




git-svn-id: http://skia.googlecode.com/svn/trunk@4802 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-27 13:27:35 +00:00
robertphillips@google.com
e4d69c0e46 Added getConservativeBound helper function to GrClipData
http://codereview.appspot.com/6454054/



git-svn-id: http://skia.googlecode.com/svn/trunk@4798 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-26 21:37:40 +00:00
robertphillips@google.com
fc91dc7004 Windows compiler complaint cleanup
http://codereview.appspot.com/6441055/



git-svn-id: http://skia.googlecode.com/svn/trunk@4796 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-26 21:18:31 +00:00
scroggo@google.com
15011ee5e4 Make SkDeferredCanvas query SkGPipeWriter for space allocated for bitmaps.
SkGPipe now has a method to report how much memory is used for its shared heap.

BUG=http://code.google.com/p/skia/issues/detail?id=738
TEST=DeferredCanvasTest

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4791 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-26 20:03:32 +00:00
bsalomon@google.com
1c31f63323 Remove texture/mask setters on GrPaint
Review URL: http://codereview.appspot.com/6446052/



git-svn-id: http://skia.googlecode.com/svn/trunk@4790 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-26 19:39:06 +00:00
robertphillips@google.com
beb1af78d0 Altered Ganesh's clip stack plumbing to pass down new GrClipData class
http://codereview.appspot.com/6454047/



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



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

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4780 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-26 14:48:52 +00:00
bsalomon@google.com
b8670998a5 Move filter/wrap out of GrSamplerState into GrTextureParams
Review URL: http://codereview.appspot.com/6440046/




git-svn-id: http://skia.googlecode.com/svn/trunk@4773 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 21:27:09 +00:00
george@mozilla.com
ece0100c22 Fix SK_OVERRIDE for various versions of clang
BUG=
TEST=

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

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

R=reed1
BUG=
TEST=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4763 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-25 18:52:56 +00:00
junov@chromium.org
b10a6bd0a7 Refactoring how SkDeferredCanvas manages mutable bitmaps
This CL makes the SkGPipe flavor of SkDeferredCanvas properly
decide whether to flush or record mutable bitmaps.  The flushing
is now managed by conditionally switching the canvas to non-deferred
mode, which avoids an unnecessary transient copy of the bitmap.

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

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

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



git-svn-id: http://skia.googlecode.com/svn/trunk@4745 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 22:07:50 +00:00
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