platform/upstream/libSkiaSharp.git
13 years agoadd SkCreateTypefaceFromCTFont() to create a typeface directly from a CTFontRef
reed@google.com [Tue, 22 Mar 2011 14:07:59 +0000 (14:07 +0000)]
add SkCreateTypefaceFromCTFont() to create a typeface directly from a CTFontRef

Compute the actual style from the returned CTFontRef, rather than assuming the
request will always be met.

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

13 years agoAdd a 'fatbits' mode to unix sample app.
scroggo [Tue, 22 Mar 2011 14:03:21 +0000 (14:03 +0000)]
Add a 'fatbits' mode to unix sample app.

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

13 years agoRemove redundant defines of GR_GL macros.
bsalomon@google.com [Tue, 22 Mar 2011 13:08:48 +0000 (13:08 +0000)]
Remove redundant defines of GR_GL macros.

Patch submitted by weiwei.li@intel.com

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

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

13 years agoadd more styles to show
mike@reedtribe.org [Tue, 22 Mar 2011 01:35:30 +0000 (01:35 +0000)]
add more styles to show

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

13 years agomap canonical css names to real fonts
mike@reedtribe.org [Tue, 22 Mar 2011 01:32:34 +0000 (01:32 +0000)]
map canonical css names to real fonts

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

13 years agoRemove IMG multisample texture support.
bsalomon@google.com [Mon, 21 Mar 2011 21:38:40 +0000 (21:38 +0000)]
Remove IMG multisample texture support.

This never worked correctly. The texture loses multisample status when the resolve occurs. We never had code to re-establish it. Also, we'd have to handle the case where you resolve but then want to render to it again without clearing.

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

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

13 years agoconvert fixed->scalar directly, since we know that the
reed@google.com [Mon, 21 Mar 2011 21:25:35 +0000 (21:25 +0000)]
convert fixed->scalar directly, since we know that the
glyph's advance is already base-1000

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

13 years agoRemove old GR_* macros for GL extensions in favor of GrGLDefines.h
bsalomon@google.com [Mon, 21 Mar 2011 21:10:33 +0000 (21:10 +0000)]
Remove old GR_* macros for GL extensions in favor of GrGLDefines.h

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

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

13 years agoincrease intermediate precision when chopping lines. This avoids returning a
reed@google.com [Mon, 21 Mar 2011 20:33:42 +0000 (20:33 +0000)]
increase intermediate precision when chopping lines. This avoids returning a
computed value that is accidentally outside of the original range.

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

13 years agoAdd GR_DLL builds to Ganesh (minimal exports for Chrome multi-dll for now).
bsalomon@google.com [Mon, 21 Mar 2011 19:51:57 +0000 (19:51 +0000)]
Add GR_DLL builds to Ganesh (minimal exports for Chrome multi-dll for now).

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

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

13 years agochange -lpng12 to -lpng
reed@google.com [Mon, 21 Mar 2011 17:45:15 +0000 (17:45 +0000)]
change -lpng12 to -lpng
The distinction doesn't seem necessary, and newer installs are getting 1.4 or later of libpng

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

13 years agoFix line endings on gyp file.
bsalomon@google.com [Mon, 21 Mar 2011 13:34:23 +0000 (13:34 +0000)]
Fix line endings on gyp file.

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

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

13 years agoallow window-subclass to handle dispatching click events (for resize)
mike@reedtribe.org [Mon, 21 Mar 2011 00:53:39 +0000 (00:53 +0000)]
allow window-subclass to handle dispatching click events (for resize)
add drag tracking to Draw

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

13 years agoadd draw sample
mike@reedtribe.org [Sun, 20 Mar 2011 20:19:16 +0000 (20:19 +0000)]
add draw sample

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

13 years agoMake SkDeviceFactory part of the API.
vandebo@chromium.org [Sat, 19 Mar 2011 17:27:49 +0000 (17:27 +0000)]
Make SkDeviceFactory part of the API.

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

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

13 years agoPass motion events in the unix sample app.
scroggo [Fri, 18 Mar 2011 22:09:01 +0000 (22:09 +0000)]
Pass motion events in the unix sample app.

Allows dragging and flinging the samples.

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

13 years agoUpdates to the unix sample app.
scroggo [Fri, 18 Mar 2011 21:43:03 +0000 (21:43 +0000)]
Updates to the unix sample app.

Rather than placing pixels, use XPutImage to place the bitmap on screen.

Modify the color arrangements for 8888 when building the sample app, so
they agree with X.

Add a title to simple sample.

Include SkTouchGesture.

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

13 years agofix scalar math to work with float and fixed
reed@google.com [Fri, 18 Mar 2011 21:23:45 +0000 (21:23 +0000)]
fix scalar math to work with float and fixed

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

13 years agofix warnings of int->float and double->float
reed@google.com [Fri, 18 Mar 2011 20:53:44 +0000 (20:53 +0000)]
fix warnings of int->float and double->float

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

13 years agoRemove the compile-time selection of the GL implementation based on the
twiz@google.com [Fri, 18 Mar 2011 20:41:44 +0000 (20:41 +0000)]
Remove the compile-time selection of the GL implementation based on the
GR_SUPPORT_GLDESKTOP family of macros.

Support for the platform is configured dynamically, by querying the
fBindingsExported member of active GrGLInterface instance.

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

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

13 years agoThis CL removes all dependencies on GL headers across all of Ganesh. New
twiz@google.com [Fri, 18 Mar 2011 17:38:11 +0000 (17:38 +0000)]
This CL removes all dependencies on GL headers across all of Ganesh.  New
GrGLint, etc. types are introduced, and new GR_GL_XXXX constants for use at all
GL call-sites.

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

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

13 years agoRevert GR_STATIC_RECT_VB in GrGLConfig_chrome.h
bsalomon@google.com [Fri, 18 Mar 2011 15:10:06 +0000 (15:10 +0000)]
Revert GR_STATIC_RECT_VB in GrGLConfig_chrome.h

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

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

13 years agofix warnings (local storage too small, int->scalar)
reed@google.com [Fri, 18 Mar 2011 14:47:36 +0000 (14:47 +0000)]
fix warnings (local storage too small, int->scalar)

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

13 years agochange operator== to return bool instead of int
reed@google.com [Fri, 18 Mar 2011 14:44:42 +0000 (14:44 +0000)]
change operator== to return bool instead of int
update dox formating

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

13 years agoInitial GYP file for skia / gr. Builds SampleApp on Mac, Windows, Linux.
bsalomon@google.com [Fri, 18 Mar 2011 14:29:44 +0000 (14:29 +0000)]
Initial GYP file for skia / gr. Builds SampleApp on Mac, Windows, Linux.

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

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

13 years agouse SkSafeUnref()
mike@reedtribe.org [Fri, 18 Mar 2011 10:33:47 +0000 (10:33 +0000)]
use SkSafeUnref()

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

13 years agoabort drawing if srcRect is outside of the bitmap bounds
reed@google.com [Thu, 17 Mar 2011 17:48:04 +0000 (17:48 +0000)]
abort drawing if srcRect is outside of the bitmap bounds

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

13 years agoAddition of missing file in Visual Studio sample app project file.
twiz@google.com [Thu, 17 Mar 2011 04:14:52 +0000 (04:14 +0000)]
Addition of missing file in Visual Studio sample app project file.

Regression introduced by revision:  http://code.google.com/p/skia/source/detail?r=946

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

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

13 years agoMake chrome use the static square vb when drawing rects.
bsalomon@google.com [Wed, 16 Mar 2011 20:10:48 +0000 (20:10 +0000)]
Make chrome use the static square vb when drawing rects.

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

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

13 years agoupdate dox for setLooper()
reed@google.com [Wed, 16 Mar 2011 20:02:59 +0000 (20:02 +0000)]
update dox for setLooper()
update some { } styles

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

13 years agoRemove dependence on glew for creating SkOSWindow_Win's GL ctx.
bsalomon@google.com [Wed, 16 Mar 2011 12:52:03 +0000 (12:52 +0000)]
Remove dependence on glew for creating SkOSWindow_Win's GL ctx.

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

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

13 years agoadd fling
reed@google.com [Wed, 16 Mar 2011 12:10:02 +0000 (12:10 +0000)]
add fling

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

13 years agoAdd SK_API to SkCreateTypefaceFromLOGFONT.
ctguil@chromium.org [Wed, 16 Mar 2011 00:31:36 +0000 (00:31 +0000)]
Add SK_API to SkCreateTypefaceFromLOGFONT.

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

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

13 years agoAdd code needed to build skia as a windows dll within the chromium project.
ctguil@chromium.org [Tue, 15 Mar 2011 21:27:08 +0000 (21:27 +0000)]
Add code needed to build skia as a windows dll within the chromium project.
- Export/import skia APIs if SKIA_DLL is defined.
- This change has no effect on skia.

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

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

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