Commit Graph

408 Commits

Author SHA1 Message Date
bsalomon@google.com
d472620458 Registry-based unit test for custom effects
Review URL: http://codereview.appspot.com/6447085/



git-svn-id: http://skia.googlecode.com/svn/trunk@4946 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-03 14:34:46 +00:00
scroggo@google.com
1554360a95 Store more behavior of SkFlatDictionary in SkFlatController.
Code refactoring for simplicity.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4929 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-02 18:49:49 +00:00
bsalomon@google.com
c3841b927b Move GL programs unit test code to tests project.
Review URL: http://codereview.appspot.com/6453079/



git-svn-id: http://skia.googlecode.com/svn/trunk@4927 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-02 18:11:43 +00:00
junov@chromium.org
cd62ecf39a Fixing leak of SkPixelRef object in CanvasTest
Review URL: https://codereview.appspot.com/6441095

git-svn-id: http://skia.googlecode.com/svn/trunk@4925 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-02 17:43:25 +00:00
borenet@google.com
5a69ef7f10 Disable ReadWriteAlpha test on Android
Failing on Nexus 7

Bug: http://code.google.com/p/skia/issues/detail?id=753
Review URL: https://codereview.appspot.com/6455077

git-svn-id: http://skia.googlecode.com/svn/trunk@4921 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-02 16:13:23 +00:00
bsalomon@google.com
cf8fb1f6f0 Create GPU-less build of Skia.
git-svn-id: http://skia.googlecode.com/svn/trunk@4912 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-02 14:03:32 +00:00
robertphillips@google.com
08eacc1447 Added check for aa/bw rect merging
http://codereview.appspot.com/6449079/



git-svn-id: http://skia.googlecode.com/svn/trunk@4907 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-02 12:49:00 +00:00
reed@google.com
eef938c0a7 check that copied paths have the same segment-masks as their src
git-svn-id: http://skia.googlecode.com/svn/trunk@4898 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-01 20:01:49 +00:00
scroggo@google.com
0c3e5fe728 Pipe factory names independently from the flattenables using them.
Avoids an issue where a flattenable written twice might be written
differently (the first time the flat data may have a name, whereas
the second time it will have an index).

Also add a test which confirms that identical flattenables will have
the same SkFlatData representation.

BUG=https://code.google.com/p/skia/issues/detail?id=721
TEST=FlatDataTest.cpp

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4896 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-01 19:34:20 +00:00
bungeman@google.com
c0d3f2f627 Fix units per em test.
git-svn-id: http://skia.googlecode.com/svn/trunk@4873 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-31 21:39:05 +00:00
robertphillips@google.com
641f8b19a6 Replace GrClip with SkClipStack
http://codereview.appspot.com/6449070/



git-svn-id: http://skia.googlecode.com/svn/trunk@4865 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-31 19:15:58 +00:00
reed@google.com
4b2af9c91d add getUnitsPerEm() to SkTypeface
git-svn-id: http://skia.googlecode.com/svn/trunk@4863 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-31 17:24:44 +00:00
robertphillips@google.com
7b11289b4e Added dev- & canv- prefixes to Ganesh bounding boxes to indicate coordinate space
http://codereview.appspot.com/6457061/



git-svn-id: http://skia.googlecode.com/svn/trunk@4856 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-31 15:18:21 +00:00
robertphillips@google.com
f8d904a7ee GrClip no longer translates its clips (to better mimic SkClipStack's behavior)
http://codereview.appspot.com/6445052/



git-svn-id: http://skia.googlecode.com/svn/trunk@4848 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-31 12:18:16 +00:00
robertphillips@google.com
c23a63b9e2 Added test to ensure getConservativeBounds' result is clamped to render target
http://codereview.appspot.com/6447063/



git-svn-id: http://skia.googlecode.com/svn/trunk@4846 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-31 11:47:29 +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
rileya@google.com
589708bf7c Split SkGradientShader into separate files for each gradient subclass.
Review URL: https://codereview.appspot.com/6447049

git-svn-id: http://skia.googlecode.com/svn/trunk@4792 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-26 20:04:23 +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
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
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
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
scroggo@google.com
dd39488997 Avoid a loop in writeString and writePad by zeroing padding first.
Also add a benchmark to time the new improved writeString. Before
my change the bench took ~1.23ms and afterwards it takes ~.95ms.

Add some testing to ensure that writePad works properly.

TEST=Writer32Test, WriterBench

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4742 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-24 20:47:55 +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
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
scroggo@google.com
e9617eb352 In SkWriter32::writeString, initialize all memory reserved.
SkFlatData compares data which is sometimes created by writeString.
Initialize all the memory in writeString so it does not compare
uninitialized memory.

See http://code.google.com/p/skia/issues/detail?id=721&thanks=721

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4715 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-23 13:44:10 +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
reed@google.com
a276975a62 check for memory leaks in debug-build
git-svn-id: http://skia.googlecode.com/svn/trunk@4712 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-22 22:33:05 +00:00
reed@google.com
80ba7964cd add SkTRefArray, in hopes that it will enable more sharing between pictureplaybacks
in different threads.



git-svn-id: http://skia.googlecode.com/svn/trunk@4709 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-21 17:31:40 +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
junov@chromium.org
426aebc850 Adding new steps to Canvas unit test to validate that the deferred
canvas state coherence test case passes with sequences of draw commands
that trigger flushes and purges of deferred draw commands.

This CL confirms that using SkGPipe fixes the deferred canvas issues that are 
the root problem of crbug.com/133432

BUG=https://code.google.com/p/chromium/issues/detail?id=133432
Review URL: https://codereview.appspot.com/6416049

git-svn-id: http://skia.googlecode.com/svn/trunk@4687 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-20 13:21:58 +00:00
junov@chromium.org
cff01c5b60 Improving CanvasTest to verify that the destination canvas of an SkDeferredCanvas has the same state as a plain SkCanvas that received the same draw commands.
This new test code shows that the SkGPipe port of SkDeferredCanvas solves problems we were having with SkPicture.
Review URL: https://codereview.appspot.com/6425048

git-svn-id: http://skia.googlecode.com/svn/trunk@4665 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-18 21:50:26 +00:00
reed@google.com
d074c3709a Need to apply matrix to advance in generateAdvance (as we already were in generateMetrics)
Fixes b/6833339
Expand existing unittest to detect this (we needed to set both scale and skew on the paint)



git-svn-id: http://skia.googlecode.com/svn/trunk@4647 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-18 13:45:58 +00:00
robertphillips@google.com
2e41becaa9 fix for non-Windows-specific compiler error in r4624
git-svn-id: http://skia.googlecode.com/svn/trunk@4625 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-16 17:19:21 +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
junov@chromium.org
4e6dfa5152 Adding bracketing save/restore calls to SkPicture at record time and
preparing tests for enforcing save/restore balancing constraints on SkPicture

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



git-svn-id: http://skia.googlecode.com/svn/trunk@4618 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-16 14:04:59 +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
keyar@chromium.org
b630c6c8b7 Updated make_filepath test to reflect changes in picture_utils. TBR
Review URL: https://codereview.appspot.com/6350105

git-svn-id: http://skia.googlecode.com/svn/trunk@4606 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-13 18:43:39 +00:00
borenet@google.com
0cb1e2bcae Disable WritePixelsTest on Android
This fails on Xoom.  Re-enable when #634 is fixed.
Review URL: https://codereview.appspot.com/6354099

git-svn-id: http://skia.googlecode.com/svn/trunk@4584 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-12 19:48:42 +00:00
junov@chromium.org
a6c9e0e02b Cleanup restore offsets at end of SkPicture recording
Review URL: http://codereview.appspot.com/6355099/
TEST=skia unit test CanvasTest, test step TwoClipOps
BUG=https://code.google.com/p/chromium/issues/detail?id=133432



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

git-svn-id: http://skia.googlecode.com/svn/trunk@4555 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 19:57:55 +00:00
reed@google.com
79382af267 remove debugging printfs
git-svn-id: http://skia.googlecode.com/svn/trunk@4551 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-11 18:55:23 +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
reed@google.com
e2589aeebf Change SkFlatData to have a sentinel value, allowing the Compare function to
not need a loop-end-test.
Review URL: https://codereview.appspot.com/6355086

git-svn-id: http://skia.googlecode.com/svn/trunk@4517 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 19:38:01 +00:00
bsalomon@google.com
4eefe6132c Handle convex paths with degeneracies in cheap direction computation
Review URL: http://codereview.appspot.com/6349085/



git-svn-id: http://skia.googlecode.com/svn/trunk@4515 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-10 18:28:12 +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
keyar@chromium.org
c3d5831e05 Allow specific files and multiple inputs for picture testing tools.
Changed the render_pictures, bench_pictures and test_pictures.py so that multiple inputs can be given. Furthermore, specific files can also be specified.

Unit tests have also been added for picture_utils.cpp.

Committed http://code.google.com/p/skia/source/detail?r=4486

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

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