platform/upstream/libSkiaSharp.git
13 years agoadd filterTextFlags() to SkDevice (virtual) to allow device subclasses to
reed@google.com [Tue, 15 Mar 2011 20:56:58 +0000 (20:56 +0000)]
add filterTextFlags() to SkDevice (virtual) to allow device subclasses to
filter what text features we try to use. The filtering allows for implementation
limitations to dictate when we turn off certain text features.

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

13 years agoneed a separate texture for each maskformat in atlasmgr
reed@google.com [Tue, 15 Mar 2011 19:15:15 +0000 (19:15 +0000)]
need a separate texture for each maskformat in atlasmgr

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

13 years agoAdd blend constant color and use it for lcd text common case (no fancy blend or shade...
bsalomon@google.com [Tue, 15 Mar 2011 19:09:25 +0000 (19:09 +0000)]
Add blend constant color and use it for lcd text common case (no fancy blend or shaded text)

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

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

13 years agoCorrection of GLES build issue introduced by in revision:
twiz@google.com [Tue, 15 Mar 2011 16:12:21 +0000 (16:12 +0000)]
Correction of GLES build issue introduced by in revision:
http://code.google.com/p/skia/source/detail?r=937

Issue: http://code.google.com/p/skia/issues/detail?id=174
Review: http://codereview.appspot.com/4288047/

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

13 years agosupport lcd16 in text atlas (sans shader support)
reed@google.com [Tue, 15 Mar 2011 15:40:16 +0000 (15:40 +0000)]
support lcd16 in text atlas (sans shader support)

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

13 years agoAdd a sample application that runs on unix.
scroggo [Tue, 15 Mar 2011 15:15:15 +0000 (15:15 +0000)]
Add a sample application that runs on unix.

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

13 years agoImplementation of a GL-virtualization layer for Skia. This allows for
twiz@google.com [Mon, 14 Mar 2011 21:23:01 +0000 (21:23 +0000)]
Implementation of a GL-virtualization layer for Skia.  This allows for
environments using skia to specify a GL implementation at run-time, instead of
relying on the linker to pull in the appropriate GL impl.

A new structure, GrGLInterface is exposed.  This struct contains a set of
function pointers that should point to an appropriate GL implementation.

This change also removes the reliance on GLew on windows builds.

Review: http://codereview.appspot.com/4254059/

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

13 years agoUpstreaming changes from android.
djsollen@google.com [Mon, 14 Mar 2011 20:30:14 +0000 (20:30 +0000)]
Upstreaming changes from android.

- fix compile warnings in the GPU code
- upstream android specific code (ifdef protected)
- fail gracefully when a custom allocator fails

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

13 years agotrim 3-byte column at start and end of freetype bitmap
reed@google.com [Mon, 14 Mar 2011 18:09:32 +0000 (18:09 +0000)]
trim 3-byte column at start and end of freetype bitmap

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

13 years agodisable lcd format for lcd16 as well
reed@google.com [Mon, 14 Mar 2011 17:45:33 +0000 (17:45 +0000)]
disable lcd format for lcd16 as well

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

13 years agoCorrection of Windows SampleApp build break introduced by r925.
twiz@google.com [Mon, 14 Mar 2011 16:58:39 +0000 (16:58 +0000)]
Correction of Windows SampleApp build break introduced by r925.
(http://code.google.com/p/skia/source/detail?r=925)

Issue: http://codereview.appspot.com/4286053/

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

13 years agoadd LCD16 copy routine
reed@google.com [Mon, 14 Mar 2011 16:44:56 +0000 (16:44 +0000)]
add LCD16 copy routine

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

13 years agouse system font path when building on the mac
reed@google.com [Mon, 14 Mar 2011 15:08:44 +0000 (15:08 +0000)]
use system font path when building on the mac

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

13 years agowork around linker-error when building on the Mac
reed@google.com [Mon, 14 Mar 2011 15:08:03 +0000 (15:08 +0000)]
work around linker-error when building on the Mac

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

13 years agoDon't use LCD16 if SK_SUPPORT_LCDTEXT is defined (for compatibility)
reed@google.com [Mon, 14 Mar 2011 13:31:16 +0000 (13:31 +0000)]
Don't use LCD16 if SK_SUPPORT_LCDTEXT is defined (for compatibility)

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

13 years agorebaseline shadows on gpu
reed@google.com [Mon, 14 Mar 2011 13:20:04 +0000 (13:20 +0000)]
rebaseline shadows on gpu

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

13 years agoundo recent addition of kLCD16_Format to FormatIsLCD()
reed@google.com [Fri, 11 Mar 2011 20:09:42 +0000 (20:09 +0000)]
undo recent addition of kLCD16_Format to FormatIsLCD()

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

13 years agoadd tristate toggle 'l' for lcd text drawing
reed@google.com [Fri, 11 Mar 2011 20:08:25 +0000 (20:08 +0000)]
add tristate toggle 'l' for lcd text drawing

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

13 years agoFixes shadow colors with alpha value smaller that one. Results were too transparent.
junov@google.com [Fri, 11 Mar 2011 16:45:00 +0000 (16:45 +0000)]
Fixes shadow colors with alpha value smaller that one.  Results were too transparent.
code review: codereview.appspot.com/4267052
skia bug: 170

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

13 years agosupport lcd16 mask format
reed@google.com [Fri, 11 Mar 2011 15:42:51 +0000 (15:42 +0000)]
support lcd16 mask format
convert line-endings to unix style (the default for skia)

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

13 years agoUse Type3 fonts for platforms that don't yet support SkFontHost::GetAdvancedTypefaceM...
vandebo@chromium.org [Thu, 10 Mar 2011 22:50:28 +0000 (22:50 +0000)]
Use Type3 fonts for platforms that don't yet support SkFontHost::GetAdvancedTypefaceMetrics.

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

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

13 years agoFix warnings of SkScalar -> int conversions, by using SkScalarRound()
reed@google.com [Thu, 10 Mar 2011 19:40:34 +0000 (19:40 +0000)]
Fix warnings of SkScalar -> int conversions, by using SkScalarRound()

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

13 years agoadd kLCD16_Format to the list in FormatIsLCD()
reed@google.com [Thu, 10 Mar 2011 19:25:22 +0000 (19:25 +0000)]
add kLCD16_Format to the list in FormatIsLCD()

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

13 years agoAdd complex clip gm sample and cleanup unused headers/code in SampleComplexClip
bsalomon@google.com [Thu, 10 Mar 2011 19:20:15 +0000 (19:20 +0000)]
Add complex clip gm sample and cleanup unused headers/code in SampleComplexClip

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

13 years agoRemove offscreen GL support from SampleApp and SkOSWindow. This never worked anywhere...
bsalomon@google.com [Thu, 10 Mar 2011 18:24:15 +0000 (18:24 +0000)]
Remove offscreen GL support from SampleApp and SkOSWindow. This never worked anywhere but Mac and it doesn't work there anymore.

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

13 years agocheck-point for kLCD16_Format mask support
reed@google.com [Thu, 10 Mar 2011 15:06:27 +0000 (15:06 +0000)]
check-point for kLCD16_Format mask support
disabled for now in SkPaint.cpp (for further testing)

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

13 years agoRemove "true ||" in conditional that was accidentally checked in.
bsalomon@google.com [Thu, 10 Mar 2011 14:53:38 +0000 (14:53 +0000)]
Remove "true ||" in conditional that was accidentally checked in.

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

13 years agoDelete GL tex ID when last of GrGLTexture or GrGLRenderTarget that reference it is...
bsalomon@google.com [Thu, 10 Mar 2011 14:51:57 +0000 (14:51 +0000)]
Delete GL tex ID when last of GrGLTexture or GrGLRenderTarget that reference it is destroyed

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

13 years agoMake flush discardable and lazily reset context
bsalomon@google.com [Thu, 10 Mar 2011 14:13:19 +0000 (14:13 +0000)]
Make flush discardable and lazily reset context

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

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

13 years agoadd realloc() to SkAutoSMalloc, plus some documentation
reed@google.com [Thu, 10 Mar 2011 13:07:35 +0000 (13:07 +0000)]
add realloc() to SkAutoSMalloc, plus some documentation

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

13 years agoCorrection of the non-portable use of dynamically allocated stack arrays in the
twiz@google.com [Wed, 9 Mar 2011 23:14:04 +0000 (23:14 +0000)]
Correction of the non-portable use of dynamically allocated stack arrays in the
pdf shader code.

I briefly looked into making use of alloca, but that is also non-portable, and
deprecated in many environments.  Fell back to the SkTDArray class as a common
denominator.

This problem was introduce by the following CL:
http://codereview.appspot.com/4239061/

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

13 years agoCorrect blitmask procs to recognize that we pass them an SkColor, and if they
reed@google.com [Wed, 9 Mar 2011 13:23:57 +0000 (13:23 +0000)]
Correct blitmask procs to recognize that we pass them an SkColor, and if they
want a SkPMColor, they need to call SkPreMultiplyColor()

Add Opaque and Black optimizations for blitmask_d32

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

13 years agohttp://codereview.appspot.com/3980041/
reed@google.com [Wed, 9 Mar 2011 12:55:47 +0000 (12:55 +0000)]
http://codereview.appspot.com/3980041/

Add blitmask procs (with optional platform acceleration)
patch by yaojie.yan

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

13 years agoIf we compute an exact clip bounds prefer it over user passed bounds. Also clarify...
bsalomon@google.com [Tue, 8 Mar 2011 21:07:21 +0000 (21:07 +0000)]
If we compute an exact clip bounds prefer it over user passed bounds. Also clarify that bounds are conservative.

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

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

13 years agoRemove deleted GrApi.h from gpu xcode project
bsalomon@google.com [Tue, 8 Mar 2011 20:21:18 +0000 (20:21 +0000)]
Remove deleted GrApi.h from gpu xcode project

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

13 years agoAdd new pdf files to SampleApp xcode proj
bsalomon@google.com [Tue, 8 Mar 2011 20:19:54 +0000 (20:19 +0000)]
Add new pdf files to SampleApp xcode proj

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

13 years agoEnable compiling the PDF backend by default in the makefile.
vandebo@chromium.org [Tue, 8 Mar 2011 18:33:31 +0000 (18:33 +0000)]
Enable compiling the PDF backend by default in the makefile.

Use SKIA_PDF_SUPPORT=false to disable the PDF backend.

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

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

13 years ago[PDF] Add support for Shaders.
vandebo@chromium.org [Tue, 8 Mar 2011 18:31:02 +0000 (18:31 +0000)]
[PDF] Add support for Shaders.

- Shaders, or as they are referred to in PDF, patterns, are drawn in the coordinate system of the initial page, so when we canonicalize them, we have to consider the current transform and where they are constructed.

- Image shaders are tiled by default, this makes repeat and mirror modes easy, but means we have to draw a pattern as large as the current clip to support clamp mode.

- Gradient shaders are implemented with type 4 functions, which are basically small snippets of post script code.  I've tried to make the code generation modular and heavily commented to make it easy to understand or expand.

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

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

13 years agoAdd filters to organize the VS project. Remove unused Gr files.
bsalomon@google.com [Tue, 8 Mar 2011 18:19:05 +0000 (18:19 +0000)]
Add filters to organize the VS project. Remove unused Gr files.

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

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

13 years agoremove unused methods from SkRefPtr, as a check-point for better understanding
reed@google.com [Tue, 8 Mar 2011 16:06:06 +0000 (16:06 +0000)]
remove unused methods from SkRefPtr, as a check-point for better understanding
what we want to do with this class.

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

13 years agoadd LF at end of file (dumb warning)
reed@google.com [Tue, 8 Mar 2011 15:36:57 +0000 (15:36 +0000)]
add LF at end of file (dumb warning)

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

13 years agoadd LF at end of file (ancient warning appeased)
reed@google.com [Tue, 8 Mar 2011 15:34:06 +0000 (15:34 +0000)]
add LF at end of file (ancient warning appeased)

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

13 years agoadd const to SkColorShader's asABitmap
reed@google.com [Tue, 8 Mar 2011 14:51:44 +0000 (14:51 +0000)]
add const to SkColorShader's asABitmap

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

13 years agofix warnings in VS 2010
reed@google.com [Mon, 7 Mar 2011 21:29:21 +0000 (21:29 +0000)]
fix warnings in VS 2010
drawPaint() doesn't need +1 to fill its bounds

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

13 years agomake asABitmap() const
reed@google.com [Mon, 7 Mar 2011 19:29:00 +0000 (19:29 +0000)]
make asABitmap() const
change private cache fields in gradient to be mutable

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

13 years agoFix warning about uninit var subpathClosed
bsalomon@google.com [Mon, 7 Mar 2011 14:07:01 +0000 (14:07 +0000)]
Fix warning about uninit var subpathClosed

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

13 years ago[PDF] Re add line accidentally removed in r892.
vandebo@chromium.org [Sat, 5 Mar 2011 00:24:50 +0000 (00:24 +0000)]
[PDF] Re add line accidentally removed in r892.

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

13 years agoFix Sample App on Win32 GL window resize, fix sk->gr convexity hint, fix grpath unini...
bsalomon@google.com [Fri, 4 Mar 2011 22:48:25 +0000 (22:48 +0000)]
Fix Sample App on Win32 GL window resize, fix sk->gr convexity hint, fix grpath uninit warnings

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

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

13 years agoadd origin to device
reed@google.com [Fri, 4 Mar 2011 22:27:10 +0000 (22:27 +0000)]
add origin to device
used for interpreting the clipstack when a device is a layer

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

13 years agoAdd SkPDFUtils.cpp to build.
ctguil@chromium.org [Fri, 4 Mar 2011 21:47:04 +0000 (21:47 +0000)]
Add SkPDFUtils.cpp to build.

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

13 years agoPDF Type3 Support.
ctguil@chromium.org [Fri, 4 Mar 2011 21:43:27 +0000 (21:43 +0000)]
PDF Type3 Support.

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

13 years agoFixups for clipstack, convexity test for paths.
bsalomon@google.com [Fri, 4 Mar 2011 20:29:08 +0000 (20:29 +0000)]
Fixups for clipstack, convexity test for paths.

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

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

13 years agoUpdate windows port of of SkFontHost::GetAdvancedTypefaceMetrics to use calculateGlyp...
ctguil@chromium.org [Fri, 4 Mar 2011 19:39:56 +0000 (19:39 +0000)]
Update windows port of of SkFontHost::GetAdvancedTypefaceMetrics to use calculateGlyphCount.

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

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

13 years agofix () warning
reed@google.com [Fri, 4 Mar 2011 19:33:13 +0000 (19:33 +0000)]
fix () warning

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

13 years agoImplement SkScalerContext_Windows::generateGlyphCount() and provide access via SkGlyp...
ctguil@chromium.org [Fri, 4 Mar 2011 19:04:57 +0000 (19:04 +0000)]
Implement SkScalerContext_Windows::generateGlyphCount() and provide access via SkGlyphCache interface.
* This will be used by PDF font code.

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

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

13 years agoAdd include\ports to include path for SampleApp project on windows.
ctguil@chromium.org [Fri, 4 Mar 2011 19:03:26 +0000 (19:03 +0000)]
Add include\ports to include path for SampleApp project on windows.

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

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

13 years agoexport SkCreateTypefaceFromLOGFONT
reed@google.com [Fri, 4 Mar 2011 15:56:12 +0000 (15:56 +0000)]
export SkCreateTypefaceFromLOGFONT

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

13 years agodelete unused file
reed@google.com [Fri, 4 Mar 2011 14:05:03 +0000 (14:05 +0000)]
delete unused file

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

13 years agoDelete another unused file.
thakis@chromium.org [Fri, 4 Mar 2011 07:47:04 +0000 (07:47 +0000)]
Delete another unused file.

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

13 years ago[PDF] Restrict scalars to the range that PDF understands.
vandebo@chromium.org [Fri, 4 Mar 2011 03:15:13 +0000 (03:15 +0000)]
[PDF] Restrict scalars to the range that PDF understands.

* Add a config flag to ignore the restrictions
* Apply restriction to both SkPDFScalar and scalars used in content streams.
* +/- 32,767 for the integer part.
* +/1 1/65536 for the fraction part.

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

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

13 years agobump SkStrAppendScalar_MaxSize to 15 to handle 3-digit exponents on some
reed@google.com [Thu, 3 Mar 2011 18:43:14 +0000 (18:43 +0000)]
bump SkStrAppendScalar_MaxSize to 15 to handle 3-digit exponents on some
platforms (like windows)

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

13 years agoExpose explicit functions to stringify float's and fixed's.
vandebo@chromium.org [Thu, 3 Mar 2011 18:20:12 +0000 (18:20 +0000)]
Expose explicit functions to stringify float's and fixed's.

See http://codereview.appspot.com/4240050/

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

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

13 years agoOur region blitter (invoked by region::setPath()) must have its scanlines
reed@google.com [Thu, 3 Mar 2011 14:32:51 +0000 (14:32 +0000)]
Our region blitter (invoked by region::setPath()) must have its scanlines
fed to it in scanline order (Y sorted, then X sorted).

If, however, we call rgn->setPath(path, otherRgn) with path in inverse mode,
then our scan converter code looks like this:

if (inverse)
    blit_top
scan_convert_path
if (inverse)
    blit_bottom

This is fine, unless otherRgn is complex. If it is, then blit_top will want to
efficiently "blit" otherRgn (the part above the path), and that means calling
blitRect in an iterator. That can result in chunks being passed to our blitter
(which is really accumulating scanlines) out of scanline order.

The change is to detect that otherRgn is complex, and if it is, just perform
the op in two steps:

1. setPath on a tmp region, limited by the bounds of otherRgn (simple)
2. intersect this tmp region with the currRgn.

This is effectively what we do for non-intersect ops. Intersect was different
only because we could (sometimes) avoid the step of create a tmp region.

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

13 years agoAdd support for clipstack to Gr. GrClip is now a list of rects and paths with set...
bsalomon@google.com [Thu, 3 Mar 2011 13:54:13 +0000 (13:54 +0000)]
Add support for clipstack to Gr. GrClip is now a list of rects and paths with set operations to combine them. The stencil buffer is used to perform the set operations to put the clip into the stencil buffer. Building Gr's clip from Skia's clipStack is currently disabled due to the fact that Skia's clipStack is relative to the root layer not the current layer. This will be fixed in a subsequent CL.

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

13 years agoadd setXYWH to rects
reed@google.com [Thu, 3 Mar 2011 13:23:35 +0000 (13:23 +0000)]
add setXYWH to rects
new tests for circles

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

13 years agoFix inverse scanconversion -- be sure to keep our calls to SkBlitter in scanline
reed@google.com [Wed, 2 Mar 2011 15:58:18 +0000 (15:58 +0000)]
Fix inverse scanconversion -- be sure to keep our calls to SkBlitter in scanline
order (top to bottom), since the region blitter explicitly requires this.

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

13 years agoSample that exercises complex clipping variations.
bsalomon@google.com [Wed, 2 Mar 2011 15:35:28 +0000 (15:35 +0000)]
Sample that exercises complex clipping variations.

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

13 years ago#ifdef protect win specific code (e.g. LOGFONT)
reed@google.com [Wed, 2 Mar 2011 14:34:11 +0000 (14:34 +0000)]
#ifdef protect win specific code (e.g. LOGFONT)

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

13 years agocheck that alloc() succeeded before calling the scaler's getImage()
reed@google.com [Tue, 1 Mar 2011 21:33:48 +0000 (21:33 +0000)]
check that alloc() succeeded before calling the scaler's getImage()

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

13 years agobump SkStrAppendScalar_MaxSize to 14 to accomodate the largest string now that
reed@google.com [Tue, 1 Mar 2011 15:44:08 +0000 (15:44 +0000)]
bump SkStrAppendScalar_MaxSize to 14 to accomodate the largest string now that
scalar->string uses %.8g. Floats have at most 8 significant digits, plus we add
more space for sign, decimal point and exponent.

add tests to check these limits.

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

13 years agoremove obsolete generateLineHeight
reed@google.com [Tue, 1 Mar 2011 15:18:14 +0000 (15:18 +0000)]
remove obsolete generateLineHeight
use canonical lfHeight so we can compare different LOGFONTs and map
equivalent fonts (except for height) to the same typeface. To do this I
add fSize to scale the output from GDI to get from the canonical int textSize
to the actual fractional size.

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

13 years agofix float->int warning
reed@google.com [Tue, 1 Mar 2011 15:15:13 +0000 (15:15 +0000)]
fix float->int warning

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

13 years agofix warnings from windows
reed@google.com [Tue, 1 Mar 2011 15:14:44 +0000 (15:14 +0000)]
fix warnings from windows

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

13 years agoAdd uniscribe library to windows release configuration.
ctguil@chromium.org [Tue, 1 Mar 2011 02:41:03 +0000 (02:41 +0000)]
Add uniscribe library to windows release configuration.

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

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

13 years agouse sprintf to generate float->string for SkString routines, removing the
reed@google.com [Mon, 28 Feb 2011 21:29:58 +0000 (21:29 +0000)]
use sprintf to generate float->string for SkString routines, removing the
worry of first converting the scalar to a fixed.

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

13 years agoexport SkCreateTypefaceFromLOGFONT
reed@google.com [Mon, 28 Feb 2011 21:08:23 +0000 (21:08 +0000)]
export SkCreateTypefaceFromLOGFONT

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

13 years ago[PDF] Fix broken encoding conversion code for non-multibyte fonts.
vandebo@chromium.org [Mon, 28 Feb 2011 19:52:18 +0000 (19:52 +0000)]
[PDF] Fix broken encoding conversion code for non-multibyte fonts.

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

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

13 years agoRemove SkRefCnt.cpp from windows build.
ctguil@chromium.org [Fri, 25 Feb 2011 22:21:15 +0000 (22:21 +0000)]
Remove SkRefCnt.cpp from windows build.

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

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

13 years agoremove SkRefCnt.cpp
reed@google.com [Fri, 25 Feb 2011 22:08:55 +0000 (22:08 +0000)]
remove SkRefCnt.cpp

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

13 years agoFix double delete of vb pool and missing delete of ib pool
bsalomon@google.com [Fri, 25 Feb 2011 21:50:42 +0000 (21:50 +0000)]
Fix double delete of vb pool and missing delete of ib pool

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

13 years agoadd simple test for SkBitmap::getColor()
reed@google.com [Fri, 25 Feb 2011 19:50:19 +0000 (19:50 +0000)]
add simple test for SkBitmap::getColor()

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

13 years agohttp://codereview.appspot.com/4233041/
reed@google.com [Fri, 25 Feb 2011 18:10:29 +0000 (18:10 +0000)]
http://codereview.appspot.com/4233041/

Add templated version of SkAutoTUnref.
Add unittests for it.
Remove unused helper apis on SkAutoUnref.

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

13 years agoStop using deprecated APIs. Fix by twiz.
reed@google.com [Fri, 25 Feb 2011 15:07:30 +0000 (15:07 +0000)]
Stop using deprecated APIs. Fix by twiz.

http://codereview.appspot.com/4249041/
BUG=http://code.google.com/p/skia/issues/detail?id=151

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

13 years ago[PDF] Remove one copy of each content stream.
vandebo@chromium.org [Thu, 24 Feb 2011 23:22:30 +0000 (23:22 +0000)]
[PDF] Remove one copy of each content stream.

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

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

13 years ago[PDF] Change the way flip origin is done.
vandebo@chromium.org [Thu, 24 Feb 2011 23:14:04 +0000 (23:14 +0000)]
[PDF] Change the way flip origin is done.

The PDF shader matrix is dependent on flip origin or not, so we need to set it at device creation time.

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

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

13 years agoAdd SkBitmap::getColor(int x, int y) - return the color of a pixel in a bitmap.
vandebo@chromium.org [Thu, 24 Feb 2011 22:50:55 +0000 (22:50 +0000)]
Add SkBitmap::getColor(int x, int y) - return the color of a pixel in a bitmap.

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

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

13 years ago[PDF] Bug fix - missing last odd column in 4444 bitmaps.
vandebo@chromium.org [Thu, 24 Feb 2011 21:51:13 +0000 (21:51 +0000)]
[PDF] Bug fix - missing last odd column in 4444 bitmaps.

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

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

13 years ago[PDF] Clean up SkPDFStream and make it inherit from SkPDFDict.
vandebo@chromium.org [Thu, 24 Feb 2011 21:50:04 +0000 (21:50 +0000)]
[PDF] Clean up SkPDFStream and make it inherit from SkPDFDict.

A stream is a dictionary (with a couple particular entries) plus the data.
The common parent is useful for the shader implementation.

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

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

13 years agofix bool bug so we can multisample now
reed@google.com [Thu, 24 Feb 2011 21:42:29 +0000 (21:42 +0000)]
fix bool bug so we can multisample now

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

13 years agoGuard globalRef() virtual with #ifdef ANDROID, as these are not implemented
reed@google.com [Thu, 24 Feb 2011 18:09:46 +0000 (18:09 +0000)]
Guard globalRef() virtual with #ifdef ANDROID, as these are not implemented
nor called by Skia proper.

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

13 years agoadd isFixedWidth() to expose the newly added attribute
reed@google.com [Thu, 24 Feb 2011 18:03:12 +0000 (18:03 +0000)]
add isFixedWidth() to expose the newly added attribute

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

13 years agoUpstreaming code from android repository.
djsollen@google.com [Thu, 24 Feb 2011 16:28:51 +0000 (16:28 +0000)]
Upstreaming code from android repository.

* fix for png decoder
* clean up for SkFontHost

reviewed by reed@google.com

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

13 years agodisable assert on validateClip in default build for now
reed@google.com [Thu, 24 Feb 2011 13:04:42 +0000 (13:04 +0000)]
disable assert on validateClip in default build for now

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

13 years agoAdd asAGradient shader extraction API.
vandebo@chromium.org [Thu, 24 Feb 2011 00:21:06 +0000 (00:21 +0000)]
Add asAGradient shader extraction API.

Store initial gradient parameters.
Add compile asserts in GPU code for BitmapType ordering.

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

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

13 years agoadd fClipStack optional field to SkDraw (it is always set by canvas)
reed@google.com [Wed, 23 Feb 2011 22:39:18 +0000 (22:39 +0000)]
add fClipStack optional field to SkDraw (it is always set by canvas)

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

13 years agoset the rgn to empty if the clipstack says empty (in our validate routine)
reed@google.com [Wed, 23 Feb 2011 21:47:37 +0000 (21:47 +0000)]
set the rgn to empty if the clipstack says empty (in our validate routine)

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

13 years agoadd/update images for linux
reed@google.com [Wed, 23 Feb 2011 20:53:12 +0000 (20:53 +0000)]
add/update images for linux

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

13 years agomerge from android tree:
djsollen@google.com [Wed, 23 Feb 2011 20:46:31 +0000 (20:46 +0000)]
merge from android tree:
- optional parameters added to descriptorProc and allocPixels
- clip options to image decoders
- check for xfermode in blitter_a8
- UNROLL loops in blitrow

reviewed by reed@google.com

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

13 years agorefactor to use a shared function (clipPathHelper) between
reed@google.com [Wed, 23 Feb 2011 18:56:55 +0000 (18:56 +0000)]
refactor to use a shared function (clipPathHelper) between
SkCanvas::clipPath() and SkCanvas::validateClip().

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

13 years agoSupport unicode to glyph id conversion in windows for non-BMP characters.
ctguil@chromium.org [Wed, 23 Feb 2011 18:44:57 +0000 (18:44 +0000)]
Support unicode to glyph id conversion in windows for non-BMP characters.

BUG=144

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

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