platform/upstream/libSkiaSharp.git
12 years agoDeserialization locks up multithreading fix.
chudy@google.com [Mon, 30 Jul 2012 12:59:12 +0000 (12:59 +0000)]
Deserialization locks up multithreading fix.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4824 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agocheck-point for image/surface work
mike@reedtribe.org [Sun, 29 Jul 2012 20:38:16 +0000 (20:38 +0000)]
check-point for image/surface work

git-svn-id: http://skia.googlecode.com/svn/trunk@4823 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoAdded missing files to fix build.
chudy@google.com [Sat, 28 Jul 2012 23:26:10 +0000 (23:26 +0000)]
Added missing files to fix build.

TBR

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4822 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoSkia Debugger can now save modified pictures.
chudy@google.com [Sat, 28 Jul 2012 20:16:11 +0000 (20:16 +0000)]
Skia Debugger can now save modified pictures.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4821 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoshape ops work in progress
caryclark@google.com [Fri, 27 Jul 2012 21:22:25 +0000 (21:22 +0000)]
shape ops work in progress

git-svn-id: http://skia.googlecode.com/svn/trunk@4820 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agocheck-point for surface experiment
reed@google.com [Fri, 27 Jul 2012 21:10:42 +0000 (21:10 +0000)]
check-point for surface experiment

git-svn-id: http://skia.googlecode.com/svn/trunk@4819 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoAdd support for ARM without EDSP and ARMv6+
george@mozilla.com [Fri, 27 Jul 2012 21:08:01 +0000 (21:08 +0000)]
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

12 years agoIn SkGPipe, only serialize SkTypefaces in cross process mode.
scroggo@google.com [Fri, 27 Jul 2012 20:39:19 +0000 (20:39 +0000)]
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

12 years agoAdded an option to specify the tiling size to render_pictures.
keyar@chromium.org [Fri, 27 Jul 2012 20:09:26 +0000 (20:09 +0000)]
Added an option to specify the tiling size to render_pictures.

With this change I should be able to start merging the rendering implementations of bench_pictures and render_pictures.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4816 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoshape ops work in progress
caryclark@google.com [Fri, 27 Jul 2012 18:26:38 +0000 (18:26 +0000)]
shape ops work in progress

git-svn-id: http://skia.googlecode.com/svn/trunk@4815 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agofix the build after intentional break
epoger@google.com [Fri, 27 Jul 2012 18:15:03 +0000 (18:15 +0000)]
fix the build after intentional break

git-svn-id: http://skia.googlecode.com/svn/trunk@4814 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agointentionally break the build to test notifications
epoger@google.com [Fri, 27 Jul 2012 18:13:31 +0000 (18:13 +0000)]
intentionally break the build to test notifications

git-svn-id: http://skia.googlecode.com/svn/trunk@4813 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agocheck-point for image experiment
reed@google.com [Fri, 27 Jul 2012 18:02:50 +0000 (18:02 +0000)]
check-point for image experiment

git-svn-id: http://skia.googlecode.com/svn/trunk@4811 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoAdd virtual destructor to class with virtual functions.
justinlin@google.com [Fri, 27 Jul 2012 17:37:12 +0000 (17:37 +0000)]
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

12 years agoAlways store pixels of mutable bitmaps when recording a SkPicture.
djsollen@google.com [Fri, 27 Jul 2012 15:58:23 +0000 (15:58 +0000)]
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

12 years agoRenamed and made public SkGradientShaderBases's 'commonAsAGradient' to 'getGradientTa...
rileya@google.com [Fri, 27 Jul 2012 15:49:05 +0000 (15:49 +0000)]
Renamed and made public SkGradientShaderBases's 'commonAsAGradient' to 'getGradientTableBitmap', and use that instead of asABitmap in gradient custom stage setup.

Also tidied up Gr gradient implementation constructors, to take the appropriate SkGradientShaderBase subclass, and where necessary (namely 2pt radial/conical) made them obtain extra parameters from that object, rather than passing them in in addition to it.
Review URL: https://codereview.appspot.com/6449057

git-svn-id: http://skia.googlecode.com/svn/trunk@4808 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agorename private animator type SkImage to SkImageBitmapBase, to avoid conflicts
reed@google.com [Fri, 27 Jul 2012 15:30:40 +0000 (15:30 +0000)]
rename private animator type SkImage to SkImageBitmapBase, to avoid conflicts
with new public type SkImage

git-svn-id: http://skia.googlecode.com/svn/trunk@4807 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoUpdate list of platforms to rebaseline
epoger@google.com [Fri, 27 Jul 2012 15:19:54 +0000 (15:19 +0000)]
Update list of platforms to rebaseline
Review URL: https://codereview.appspot.com/6441061

git-svn-id: http://skia.googlecode.com/svn/trunk@4806 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoMove GPU gradients into src/effects/gradients.
rileya@google.com [Fri, 27 Jul 2012 14:00:39 +0000 (14:00 +0000)]
Move GPU gradients into src/effects/gradients.
Review URL: https://codereview.appspot.com/6453055

git-svn-id: http://skia.googlecode.com/svn/trunk@4805 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoReapply "Remove Bitmaps Raw Pixel Support."
djsollen@google.com [Fri, 27 Jul 2012 13:41:44 +0000 (13:41 +0000)]
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

12 years agorevert 4799-4801 -- red and blue are reversed on windows and linux
reed@google.com [Fri, 27 Jul 2012 13:29:59 +0000 (13:29 +0000)]
revert 4799-4801 -- red and blue are reversed on windows and linux

git-svn-id: http://skia.googlecode.com/svn/trunk@4803 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoSpecialize SkAutoTUnref on const T so that operator -> works.
bsalomon@google.com [Fri, 27 Jul 2012 13:27:35 +0000 (13:27 +0000)]
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

12 years agouse SK_RESTRICT instead of __restrict__
reed@google.com [Fri, 27 Jul 2012 13:08:36 +0000 (13:08 +0000)]
use SK_RESTRICT instead of __restrict__

git-svn-id: http://skia.googlecode.com/svn/trunk@4801 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agouse intptr_t to cast from ptr to int for masking low bits
reed@google.com [Fri, 27 Jul 2012 13:03:37 +0000 (13:03 +0000)]
use intptr_t to cast from ptr to int for masking low bits

git-svn-id: http://skia.googlecode.com/svn/trunk@4800 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoland http://codereview.appspot.com/6327044/
reed@google.com [Fri, 27 Jul 2012 12:52:31 +0000 (12:52 +0000)]
land http://codereview.appspot.com/6327044/

SSE optimization for 565 pixel format -- by Lei

git-svn-id: http://skia.googlecode.com/svn/trunk@4799 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoAdded getConservativeBound helper function to GrClipData
robertphillips@google.com [Thu, 26 Jul 2012 21:37:40 +0000 (21:37 +0000)]
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

12 years agoMac build fix after gradient restructure/renaming.
rileya@google.com [Thu, 26 Jul 2012 21:25:09 +0000 (21:25 +0000)]
Mac build fix after gradient restructure/renaming.
Review URL: https://codereview.appspot.com/6441057

git-svn-id: http://skia.googlecode.com/svn/trunk@4797 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoWindows compiler complaint cleanup
robertphillips@google.com [Thu, 26 Jul 2012 21:18:31 +0000 (21:18 +0000)]
Windows compiler complaint cleanup

http://codereview.appspot.com/6441055/

git-svn-id: http://skia.googlecode.com/svn/trunk@4796 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoFirst stab at committing GM baselines for Shuttle_Ubuntu12_ATI5770
epoger@google.com [Thu, 26 Jul 2012 20:54:34 +0000 (20:54 +0000)]
First stab at committing GM baselines for Shuttle_Ubuntu12_ATI5770
bsalomon looked at skdiff output and approved

git-svn-id: http://skia.googlecode.com/svn/trunk@4795 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoKey Shortcuts for Zooming. Refactored some event propogation.
chudy@google.com [Thu, 26 Jul 2012 20:26:44 +0000 (20:26 +0000)]
Key Shortcuts for Zooming. Refactored some event propogation.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4794 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoFirst stab at committing GM baselines for shuttle_win7_intel
epoger@google.com [Thu, 26 Jul 2012 20:17:26 +0000 (20:17 +0000)]
First stab at committing GM baselines for shuttle_win7_intel
bsalomon looked at skdiff output and approved

git-svn-id: http://skia.googlecode.com/svn/trunk@4793 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoSplit SkGradientShader into separate files for each gradient subclass.
rileya@google.com [Thu, 26 Jul 2012 20:04:23 +0000 (20:04 +0000)]
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

12 years agoMake SkDeferredCanvas query SkGPipeWriter for space allocated for bitmaps.
scroggo@google.com [Thu, 26 Jul 2012 20:03:32 +0000 (20:03 +0000)]
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

12 years agoRemove texture/mask setters on GrPaint
bsalomon@google.com [Thu, 26 Jul 2012 19:39:06 +0000 (19:39 +0000)]
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

12 years agoGL Widget Alpha
chudy@google.com [Thu, 26 Jul 2012 19:38:22 +0000 (19:38 +0000)]
GL Widget Alpha

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4789 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoAltered Ganesh's clip stack plumbing to pass down new GrClipData class
robertphillips@google.com [Thu, 26 Jul 2012 18:52:16 +0000 (18:52 +0000)]
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

12 years agoAdded ctor to SkClipStack and isEmpty method
robertphillips@google.com [Thu, 26 Jul 2012 18:39:13 +0000 (18:39 +0000)]
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

12 years agoChanged to a class based method in passing around the rendering method for render_pic...
keyar@chromium.org [Thu, 26 Jul 2012 17:27:57 +0000 (17:27 +0000)]
Changed to a class based method in passing around the rendering method for render_pictures.

This is based on a comment for https://codereview.appspot.com/6427061/

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4786 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoreject any paths that are not finite.
reed@google.com [Thu, 26 Jul 2012 16:11:47 +0000 (16:11 +0000)]
reject any paths that are not finite.

git-svn-id: http://skia.googlecode.com/svn/trunk@4785 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoexplicitly track if a path is finite or not
reed@google.com [Thu, 26 Jul 2012 15:20:36 +0000 (15:20 +0000)]
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

12 years agoWhitespace change to trigger rebuild after slave script modifications
borenet@google.com [Thu, 26 Jul 2012 15:14:57 +0000 (15:14 +0000)]
Whitespace change to trigger rebuild after slave script modifications

git-svn-id: http://skia.googlecode.com/svn/trunk@4783 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agorebaseline after gpu changes
reed@google.com [Thu, 26 Jul 2012 14:55:46 +0000 (14:55 +0000)]
rebaseline after gpu changes

git-svn-id: http://skia.googlecode.com/svn/trunk@4781 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoRevert "Remove Bitmaps Raw Pixel Support."
djsollen@google.com [Thu, 26 Jul 2012 14:48:52 +0000 (14:48 +0000)]
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

12 years agoImplementing Color32 functions for Neon platforms.
borenet@google.com [Thu, 26 Jul 2012 14:20:13 +0000 (14:20 +0000)]
Implementing Color32 functions for Neon platforms.

Besides the raw processing improvement provided by Neon, the code uses memory
preteches (pld) which seem to improve performance greatly when dealing with
very large counts.

This was tested using bench where color32 accounts for the majority of the
workload:
bench -match rects_1 -config 8888 -repeat 500 -forceBlend 1
(the forceBlend is there so that the Color32 code does not go through the
special cases where alpha == 0xFF as it would transform color32 into
a sk_memset32.

Numbers averaged over 3 runs:
bench name      | Before | Neon, no pld | Neon with pld | full boost
rrects_1        | 153.9  | 128.3        | 92            | 1.66x
rects_1_stroke_4| 32.8   | 31.4         | 28.45         | 1.15x
rects_1         | 125.35 | 97.2         | 63.59         | 1.97x

Credits: various googletv team members.

Committed on behalf of evannier.
Review URL: http://codereview.appspot.com/5569077/

git-svn-id: http://skia.googlecode.com/svn/trunk@4779 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoFix reversed bilerp setting in GrTextContext in r4773
bsalomon@google.com [Thu, 26 Jul 2012 14:12:23 +0000 (14:12 +0000)]
Fix reversed bilerp setting in GrTextContext in r4773

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4778 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoCorrectly calculate remaining span length in Neon fallback blitter
skyostil@google.com [Thu, 26 Jul 2012 12:19:26 +0000 (12:19 +0000)]
Correctly calculate remaining span length in Neon fallback blitter

In the non-Neon optimized fallback in SCALE_NOFILTER_NAME() the pixels
are first processed in groups of 4, followed by the final remaining 0-3
pixels depending on the span length.

Currently the remaining span length (0-3) pixels is incorrectly
calculated as count - count / 4. This generally causes the function to
access outside the bounds of the input and/or output bitmaps.

The correct formula is count % 4, because all the full multiples of 4
pixels have been processed and only the remainder remains.

Bug spotted by Xianzhu Wang.

TEST=None, because this part of the code isn't actually even being compiled due
to the !defined(__ARM_HAVE_NEON) guard at the top of the file. It was compiled
in by mistake in Chrome for Android, which is how this bug was spotted.
Review URL: https://codereview.appspot.com/6441050

git-svn-id: http://skia.googlecode.com/svn/trunk@4777 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoMove filter/wrap out of GrSamplerState into GrTextureParams
bsalomon@google.com [Wed, 25 Jul 2012 21:27:09 +0000 (21:27 +0000)]
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

12 years agoshape ops work in progress
caryclark@google.com [Wed, 25 Jul 2012 20:59:42 +0000 (20:59 +0000)]
shape ops work in progress

git-svn-id: http://skia.googlecode.com/svn/trunk@4771 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoRemove uniform names from top of GrGLProgram.cpp, builder responsible for "u" and...
bsalomon@google.com [Wed, 25 Jul 2012 20:58:20 +0000 (20:58 +0000)]
Remove uniform names from top of GrGLProgram.cpp, builder responsible for "u" and stage num tags.

Also add LF eol-style property to some files in src/gpu/effects.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4770 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoFixing canvas writePixels malfunctioning with SkDeferredCanvas with SkGPipe backend...
junov@chromium.org [Wed, 25 Jul 2012 20:09:37 +0000 (20:09 +0000)]
Fixing canvas writePixels malfunctioning with SkDeferredCanvas with SkGPipe backend and GPU rendering

BUG=http://code.google.com/p/chromium/issues/detail?id=138935
Review URL: https://codereview.appspot.com/6450045

git-svn-id: http://skia.googlecode.com/svn/trunk@4769 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoUse CGToScalar instead of SkFloatToScalar as CGFloat can be either double or float.
george@mozilla.com [Wed, 25 Jul 2012 19:16:49 +0000 (19:16 +0000)]
Use CGToScalar instead of SkFloatToScalar as CGFloat can be either double or float.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4766 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoFix SK_OVERRIDE for various versions of clang
george@mozilla.com [Wed, 25 Jul 2012 19:05:43 +0000 (19:05 +0000)]
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

12 years agoEnsure that all GNU-based systems are considered to be UNIX
george@mozilla.com [Wed, 25 Jul 2012 18:52:56 +0000 (18:52 +0000)]
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

12 years agoRebaseline for single pixel radial gradient change caused by r4755.
rileya@google.com [Wed, 25 Jul 2012 18:15:54 +0000 (18:15 +0000)]
Rebaseline for single pixel radial gradient change caused by r4755.

git-svn-id: http://skia.googlecode.com/svn/trunk@4762 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoDisable unused uniform assert due to texture matrices being crammed down stage's...
bsalomon@google.com [Wed, 25 Jul 2012 18:13:32 +0000 (18:13 +0000)]
Disable unused uniform assert due to texture matrices being crammed down stage's throats

git-svn-id: http://skia.googlecode.com/svn/trunk@4761 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoFix static assert on non-windows compilers(?)
bsalomon@google.com [Wed, 25 Jul 2012 17:55:26 +0000 (17:55 +0000)]
Fix static assert on non-windows compilers(?)

git-svn-id: http://skia.googlecode.com/svn/trunk@4759 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoAdd GL uniform manager
bsalomon@google.com [Wed, 25 Jul 2012 17:48:39 +0000 (17:48 +0000)]
Add GL uniform manager
Review URL: http://codereview.appspot.com/6423066/

git-svn-id: http://skia.googlecode.com/svn/trunk@4758 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoRefactoring how SkDeferredCanvas manages mutable bitmaps
junov@chromium.org [Wed, 25 Jul 2012 17:27:13 +0000 (17:27 +0000)]
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

12 years agoUse asNewCustomStage instead of asABitmap in SkGpuDevice, also removed now-unecessary...
rileya@google.com [Wed, 25 Jul 2012 17:18:31 +0000 (17:18 +0000)]
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

12 years agoAdd SkScalarPow.
bungeman@google.com [Wed, 25 Jul 2012 17:00:47 +0000 (17:00 +0000)]
Add SkScalarPow.

git-svn-id: http://skia.googlecode.com/svn/trunk@4754 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoPrevent MipMaps from crashing.
bungeman@google.com [Wed, 25 Jul 2012 16:09:10 +0000 (16:09 +0000)]
Prevent MipMaps from crashing.

git-svn-id: http://skia.googlecode.com/svn/trunk@4753 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoFix Android build for new toolchain
borenet@google.com [Wed, 25 Jul 2012 15:17:03 +0000 (15:17 +0000)]
Fix Android build for new toolchain

The new toolchain (r8b) does not automatically include
the necessary directories
(http://code.google.com/p/android/issues/detail?id=35279).
Add them manually until this is fixed.
Review URL: https://codereview.appspot.com/6419076

git-svn-id: http://skia.googlecode.com/svn/trunk@4749 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoexperimental only
reed@google.com [Wed, 25 Jul 2012 14:42:15 +0000 (14:42 +0000)]
experimental only

git-svn-id: http://skia.googlecode.com/svn/trunk@4748 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoshape ops work in progress
caryclark@google.com [Wed, 25 Jul 2012 12:05:18 +0000 (12:05 +0000)]
shape ops work in progress

git-svn-id: http://skia.googlecode.com/svn/trunk@4746 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoAdded isIntersectionOfRects to SkClipStack
robertphillips@google.com [Tue, 24 Jul 2012 22:07:50 +0000 (22:07 +0000)]
Added isIntersectionOfRects to SkClipStack

http://codereview.appspot.com/6434050/

git-svn-id: http://skia.googlecode.com/svn/trunk@4745 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoUse GrMemoryPool to manage GrCustomStage allocations.
tomhudson@google.com [Tue, 24 Jul 2012 21:36:16 +0000 (21:36 +0000)]
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

12 years agoFix Android build broken due to changes in r4741.
bungeman@google.com [Tue, 24 Jul 2012 21:18:54 +0000 (21:18 +0000)]
Fix Android build broken due to changes in r4741.

git-svn-id: http://skia.googlecode.com/svn/trunk@4743 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoAvoid a loop in writeString and writePad by zeroing padding first.
scroggo@google.com [Tue, 24 Jul 2012 20:47:55 +0000 (20:47 +0000)]
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

12 years agoSplit SkGlyph into its own header.
bungeman@google.com [Tue, 24 Jul 2012 20:33:21 +0000 (20:33 +0000)]
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

12 years agoRevert r4671
borenet@google.com [Tue, 24 Jul 2012 18:32:14 +0000 (18:32 +0000)]
Revert r4671

Add deleted giantbitmap images after fix of 718.
Review URL: https://codereview.appspot.com/6425065

git-svn-id: http://skia.googlecode.com/svn/trunk@4740 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoRevert r5667
borenet@google.com [Tue, 24 Jul 2012 18:28:23 +0000 (18:28 +0000)]
Revert r5667

Add deleted giantbitmap images back after fix of #718
Review URL: https://codereview.appspot.com/6431065

git-svn-id: http://skia.googlecode.com/svn/trunk@4739 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoAdded requires_AA method to GrClipMaskManager.cpp to replace GrClip capability
robertphillips@google.com [Tue, 24 Jul 2012 18:20:10 +0000 (18:20 +0000)]
Added requires_AA method to GrClipMaskManager.cpp to replace GrClip capability

http://codereview.appspot.com/6422062/

git-svn-id: http://skia.googlecode.com/svn/trunk@4738 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoshape ops work in progress
caryclark@google.com [Tue, 24 Jul 2012 18:11:03 +0000 (18:11 +0000)]
shape ops work in progress

git-svn-id: http://skia.googlecode.com/svn/trunk@4737 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoFix npot bitmap tiling
bsalomon@google.com [Tue, 24 Jul 2012 17:59:01 +0000 (17:59 +0000)]
Fix npot bitmap tiling

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4736 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoRemove SkSfntUtils, as it is not longer used.
bungeman@google.com [Tue, 24 Jul 2012 17:50:25 +0000 (17:50 +0000)]
Remove SkSfntUtils, as it is not longer used.

git-svn-id: http://skia.googlecode.com/svn/trunk@4735 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoSkSfntUtils should use public types.
bungeman@google.com [Tue, 24 Jul 2012 17:34:41 +0000 (17:34 +0000)]
SkSfntUtils should use public types.

git-svn-id: http://skia.googlecode.com/svn/trunk@4734 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoFix TableColorFilter memory leak.
tomhudson@google.com [Tue, 24 Jul 2012 17:24:21 +0000 (17:24 +0000)]
Fix TableColorFilter memory leak.

http://codereview.appspot.com/6437045/

git-svn-id: http://skia.googlecode.com/svn/trunk@4733 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoRebaselining to address r4730 (using SkClipStack's bound)
robertphillips@google.com [Tue, 24 Jul 2012 16:29:52 +0000 (16:29 +0000)]
Rebaselining to address r4730 (using SkClipStack's bound)

http://codereview.appspot.com/6431064/

git-svn-id: http://skia.googlecode.com/svn/trunk@4732 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoSkTextBox to use public interfaces for line layout.
bungeman@google.com [Tue, 24 Jul 2012 16:08:45 +0000 (16:08 +0000)]
SkTextBox to use public interfaces for line layout.
https://codereview.appspot.com/6438044/

git-svn-id: http://skia.googlecode.com/svn/trunk@4731 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoAdded bound computation to SkClipStack
robertphillips@google.com [Tue, 24 Jul 2012 13:54:00 +0000 (13:54 +0000)]
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

12 years agoland http://codereview.appspot.com/6353063/ by Lei
reed@google.com [Tue, 24 Jul 2012 13:53:23 +0000 (13:53 +0000)]
land http://codereview.appspot.com/6353063/ by Lei
optimizations for D16 using SSE2

skia_bench -config 565 -match bitmap_8888_scale_filter -forceFilter 1 -repeat
30

The result I got on Android platform was below:

w/o this optimization routine:
D/skia    ( 1868): running bench [640 480]     bitmap_8888_scale_filter
D/skia    ( 1868):    565: cmsecs = 286.50

w/ with optimization:
D/skia    ( 1463): running bench [640 480]     bitmap_8888_scale_filter
D/skia    ( 1463):    565: cmsecs = 186.80

The net gain is 34.80%.

git-svn-id: http://skia.googlecode.com/svn/trunk@4729 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoReplace new with SkNEW in more effects classes.
tomhudson@google.com [Tue, 24 Jul 2012 12:22:40 +0000 (12:22 +0000)]
Replace new with SkNEW in more effects classes.

http://codereview.appspot.com/6431052/

git-svn-id: http://skia.googlecode.com/svn/trunk@4727 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoshape ops work in progress
caryclark@google.com [Mon, 23 Jul 2012 21:26:31 +0000 (21:26 +0000)]
shape ops work in progress

git-svn-id: http://skia.googlecode.com/svn/trunk@4726 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agowhitespace change to trigger Skia buildbots after master update/restart
epoger@google.com [Mon, 23 Jul 2012 18:48:36 +0000 (18:48 +0000)]
whitespace change to trigger Skia buildbots after master update/restart

git-svn-id: http://skia.googlecode.com/svn/trunk@4725 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoGave GrClip an SkClipStack-style iterator
robertphillips@google.com [Mon, 23 Jul 2012 17:39:44 +0000 (17:39 +0000)]
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

12 years agoRemove Bitmaps Raw Pixel Support.
djsollen@google.com [Mon, 23 Jul 2012 16:54:30 +0000 (16:54 +0000)]
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

12 years agoupdate images after gpu changes
reed@google.com [Mon, 23 Jul 2012 15:14:18 +0000 (15:14 +0000)]
update images after gpu changes

git-svn-id: http://skia.googlecode.com/svn/trunk@4721 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agouse SkTRefArray to share readonly data between pictures
reed@google.com [Mon, 23 Jul 2012 15:04:45 +0000 (15:04 +0000)]
use SkTRefArray to share readonly data between pictures
Review URL: https://codereview.appspot.com/6351121

git-svn-id: http://skia.googlecode.com/svn/trunk@4720 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoadd protected method for internal_dispose overrides to jam fRefCnt before
reed@google.com [Mon, 23 Jul 2012 14:50:38 +0000 (14:50 +0000)]
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

12 years agoResponse to post-commit review comments on r4714
junov@chromium.org [Mon, 23 Jul 2012 14:17:45 +0000 (14:17 +0000)]
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

12 years agoupdate images after gpu change
reed@google.com [Mon, 23 Jul 2012 14:07:34 +0000 (14:07 +0000)]
update images after gpu change

git-svn-id: http://skia.googlecode.com/svn/trunk@4717 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoremoving incorrect image
reed@google.com [Mon, 23 Jul 2012 14:07:08 +0000 (14:07 +0000)]
removing incorrect image

git-svn-id: http://skia.googlecode.com/svn/trunk@4716 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoIn SkWriter32::writeString, initialize all memory reserved.
scroggo@google.com [Mon, 23 Jul 2012 13:44:10 +0000 (13:44 +0000)]
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

12 years agoFix unbound memory consumption problem with run away deferred canvases.
junov@chromium.org [Mon, 23 Jul 2012 13:35:14 +0000 (13:35 +0000)]
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

12 years agoshape ops work in progress
caryclark@google.com [Mon, 23 Jul 2012 12:14:49 +0000 (12:14 +0000)]
shape ops work in progress

git-svn-id: http://skia.googlecode.com/svn/trunk@4713 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agocheck for memory leaks in debug-build
reed@google.com [Sun, 22 Jul 2012 22:33:05 +0000 (22:33 +0000)]
check for memory leaks in debug-build

git-svn-id: http://skia.googlecode.com/svn/trunk@4712 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agouse SkData to share between record and playback
reed@google.com [Sat, 21 Jul 2012 20:31:09 +0000 (20:31 +0000)]
use SkData to share between record and playback
use SkReader32 on the stack, as a step towards thread-reentrant playback

git-svn-id: http://skia.googlecode.com/svn/trunk@4711 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoinclude <new> since we use placement-new
reed@google.com [Sat, 21 Jul 2012 19:39:24 +0000 (19:39 +0000)]
include <new> since we use placement-new

git-svn-id: http://skia.googlecode.com/svn/trunk@4710 2bbb7eff-a529-9590-31e7-b0007b416f81

12 years agoadd SkTRefArray, in hopes that it will enable more sharing between pictureplaybacks
reed@google.com [Sat, 21 Jul 2012 17:31:40 +0000 (17:31 +0000)]
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

12 years agoAdded picture recording benchmark options to bench.
keyar@chromium.org [Fri, 20 Jul 2012 23:03:42 +0000 (23:03 +0000)]
Added picture recording benchmark options to bench.

-forceRecording benchmarks how long it takes C++ code to be recorded into a picture.

-forcePictureRecording benchmarks how long it takes a picture to be recorded into a picture.

Preliminary investigation shows that the second benchmarks can often be much faster than the first. Will rerun these benchmarks and upload the results somewhere when/if this code is committed.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@4708 2bbb7eff-a529-9590-31e7-b0007b416f81