platform/upstream/libSkiaSharp.git
13 years agoadd pathfill gm sample
reed@google.com [Mon, 11 Apr 2011 13:57:04 +0000 (13:57 +0000)]
add pathfill gm sample

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

13 years agoadd benchmark for path filling
reed@google.com [Mon, 11 Apr 2011 13:12:51 +0000 (13:12 +0000)]
add benchmark for path filling

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

13 years agocode style
reed@google.com [Mon, 11 Apr 2011 11:57:54 +0000 (11:57 +0000)]
code style

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

13 years agocode style
mike@reedtribe.org [Sun, 10 Apr 2011 01:04:37 +0000 (01:04 +0000)]
code style

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

13 years agobalance sk_malloc with sk_free (instead of delete[]) in SkAutoUCS2
mike@reedtribe.org [Sun, 10 Apr 2011 00:44:32 +0000 (00:44 +0000)]
balance sk_malloc with sk_free (instead of delete[]) in SkAutoUCS2

patch submitted by alean2...@gmail.com

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

13 years agoadd init() to SkTLazy to create a default instance
mike@reedtribe.org [Sun, 10 Apr 2011 00:35:29 +0000 (00:35 +0000)]
add init() to SkTLazy to create a default instance
use SkLazyPaint in internalDrawBitmap

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

13 years agocoding style
mike@reedtribe.org [Sat, 9 Apr 2011 19:39:25 +0000 (19:39 +0000)]
coding style

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

13 years agocoding style
mike@reedtribe.org [Sat, 9 Apr 2011 19:28:43 +0000 (19:28 +0000)]
coding style

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

13 years agocoding style updates
mike@reedtribe.org [Sat, 9 Apr 2011 19:16:54 +0000 (19:16 +0000)]
coding style updates

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

13 years agoupdate coding style - no logic change
mike@reedtribe.org [Sat, 9 Apr 2011 18:54:23 +0000 (18:54 +0000)]
update coding style - no logic change

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

13 years agofast return if no part of the paint gets replaced
mike@reedtribe.org [Sat, 9 Apr 2011 18:54:08 +0000 (18:54 +0000)]
fast return if no part of the paint gets replaced

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

13 years agoAlways bind packed depth stencil formats to both attacment points
bsalomon@google.com [Fri, 8 Apr 2011 19:00:04 +0000 (19:00 +0000)]
Always bind packed depth stencil formats to both attacment points

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

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

13 years agoadd CR at end
reed@google.com [Fri, 8 Apr 2011 18:54:20 +0000 (18:54 +0000)]
add CR at end

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

13 years agofix use of smooth lines
bsalomon@google.com [Fri, 8 Apr 2011 18:07:53 +0000 (18:07 +0000)]
fix use of smooth lines
Review URL:http://codereview.appspot.com/4370050/

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

13 years agounbias fy in the gpu glyphproc, since skia has pre-added 1/2 to the value
reed@google.com [Fri, 8 Apr 2011 15:42:19 +0000 (15:42 +0000)]
unbias fy in the gpu glyphproc, since skia has pre-added 1/2 to the value
(assuming we would call floor to get a rounded value.)

apply finalFYMask not to the initial fy, but to the fyMask (so it is always
applied in the loop) in drawText.

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

13 years agoadd optional bitflags to control which aspect of each layer's paint is applied
mike@reedtribe.org [Fri, 8 Apr 2011 02:41:54 +0000 (02:41 +0000)]
add optional bitflags to control which aspect of each layer's paint is applied

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

13 years ago[PDF] Fix node count in page tree.
vandebo@chromium.org [Fri, 8 Apr 2011 01:22:45 +0000 (01:22 +0000)]
[PDF] Fix node count in page tree.

It should be the number of leaves below a given node, not the number of direct children in the node.

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

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

13 years agofix infinite loop (doh)
mike@reedtribe.org [Fri, 8 Apr 2011 00:53:48 +0000 (00:53 +0000)]
fix infinite loop (doh)

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

13 years agofix drawfilter to match new api
mike@reedtribe.org [Fri, 8 Apr 2011 00:38:05 +0000 (00:38 +0000)]
fix drawfilter to match new api
enlarge default 'z' fatbits view

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

13 years agofix infinite loop if we have a drawfilter but no drawlooper
mike@reedtribe.org [Fri, 8 Apr 2011 00:37:03 +0000 (00:37 +0000)]
fix infinite loop if we have a drawfilter but no drawlooper

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

13 years agoFix a typo in my prior commit.
Scroggo [Thu, 7 Apr 2011 21:11:49 +0000 (21:11 +0000)]
Fix a typo in my prior commit.

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

13 years agoBorg
Scroggo [Thu, 7 Apr 2011 20:56:21 +0000 (20:56 +0000)]
Borg

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

13 years agoDuring ganesh tear-down, it may be the case that the vertex and index buffers
twiz@google.com [Thu, 7 Apr 2011 15:57:12 +0000 (15:57 +0000)]
During ganesh tear-down, it may be the case that the vertex and index buffers
are those currently bound to the HW geometry state.  We should not assert under
these conditions.

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

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

13 years agorebaseline strokerects with new rounded math for hairlines
reed@google.com [Thu, 7 Apr 2011 14:21:07 +0000 (14:21 +0000)]
rebaseline strokerects with new rounded math for hairlines

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

13 years agoSimplify drawloopers and drawfilters. This allows the canvas to keep its
reed@google.com [Thu, 7 Apr 2011 14:18:59 +0000 (14:18 +0000)]
Simplify drawloopers and drawfilters. This allows the canvas to keep its
promise that const SkPaint& stay const (so we don't have bugs if a const paint
is referenced from two threads in pictures)

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

13 years agoupdate to reflect new rounding in antihairlines
reed@google.com [Thu, 7 Apr 2011 13:39:14 +0000 (13:39 +0000)]
update to reflect new rounding in antihairlines

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

13 years agoround the alphamul so we don't overflow a byte
reed@google.com [Thu, 7 Apr 2011 13:31:48 +0000 (13:31 +0000)]
round the alphamul so we don't overflow a byte

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

13 years agouse new template class SkTLazy for deferred paint initialization
reed@google.com [Wed, 6 Apr 2011 20:17:29 +0000 (20:17 +0000)]
use new template class SkTLazy for deferred paint initialization

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

13 years agoFix Two Pt Radial when circles are concentric.
bsalomon@google.com [Wed, 6 Apr 2011 19:35:37 +0000 (19:35 +0000)]
Fix Two Pt Radial when circles are concentric.

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

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

13 years agoRemove transitionary version of getAdvancedTypefaceMetrics. Webkit has been updated.
vandebo@chromium.org [Wed, 6 Apr 2011 18:18:20 +0000 (18:18 +0000)]
Remove transitionary version of getAdvancedTypefaceMetrics.  Webkit has been updated.

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

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

13 years agoAdd isMultisampled() to GrRenderTarget. Cleanup MSAA vs smooth lines logic in GrGpuGL.
bsalomon@google.com [Wed, 6 Apr 2011 17:50:02 +0000 (17:50 +0000)]
Add isMultisampled() to GrRenderTarget. Cleanup MSAA vs smooth lines logic in GrGpuGL.

Skia issue: 178

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

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

13 years agoadd strokerects baseline images
reed@google.com [Wed, 6 Apr 2011 14:39:11 +0000 (14:39 +0000)]
add strokerects baseline images

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

13 years agore-re-enable antialiased rects for gpu
reed@google.com [Wed, 6 Apr 2011 14:28:02 +0000 (14:28 +0000)]
re-re-enable antialiased rects for gpu

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

13 years agoeeek, revert last CL until I fix texture matrix
reed@google.com [Wed, 6 Apr 2011 13:46:04 +0000 (13:46 +0000)]
eeek, revert last CL until I fix texture matrix

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

13 years agoenable antialiased rects
reed@google.com [Wed, 6 Apr 2011 13:42:34 +0000 (13:42 +0000)]
enable antialiased rects

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

13 years agosupport BW text on GPU
mike@reedtribe.org [Wed, 6 Apr 2011 00:54:45 +0000 (00:54 +0000)]
support BW text on GPU

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

13 years agoFix dangling ptr when GrRenderTarget outlives its GrTexture representation
bsalomon@google.com [Tue, 5 Apr 2011 21:16:14 +0000 (21:16 +0000)]
Fix dangling ptr when GrRenderTarget outlives its GrTexture representation
Move management of fRenderTarget ptr from GL texture class to base class

Minor:
Remove redundant GrContext-per-frame debug code in SampleApp.cpp
Add GrTexture.cpp to legacy VS2010 vcxproj

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

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

13 years agocheck-point (disabled) for antialiased rects
reed@google.com [Tue, 5 Apr 2011 21:05:37 +0000 (21:05 +0000)]
check-point (disabled) for antialiased rects

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

13 years agoMake SkFlate buffers statically sized (fixes Windows compile).
vandebo@chromium.org [Tue, 5 Apr 2011 20:11:32 +0000 (20:11 +0000)]
Make SkFlate buffers statically sized (fixes Windows compile).

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

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

13 years agoadd rect.inset(dx, dy)
reed@google.com [Tue, 5 Apr 2011 20:05:56 +0000 (20:05 +0000)]
add rect.inset(dx, dy)

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

13 years agoAdd GrTexture.cpp to legacy project files
bsalomon@google.com [Tue, 5 Apr 2011 17:49:49 +0000 (17:49 +0000)]
Add GrTexture.cpp to legacy project files

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

13 years agoAdds read pixels to GrTexture and GrRenderTarget
bsalomon@google.com [Tue, 5 Apr 2011 17:08:27 +0000 (17:08 +0000)]
Adds read pixels to GrTexture and GrRenderTarget
Adds SkGrRenderTargetPixelRef for SkBitmaps that are backed by RTs that aren't textures.
Adds onReadPixels implementations for SkGr pixel ref types

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

13 years agoexport SkDraw::ComputeRectType() and share that with SkGpuDevice
reed@google.com [Tue, 5 Apr 2011 14:08:25 +0000 (14:08 +0000)]
export SkDraw::ComputeRectType() and share that with SkGpuDevice

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

13 years agoadd toggle keys:
reed@google.com [Tue, 5 Apr 2011 13:07:03 +0000 (13:07 +0000)]
add toggle keys:

'x' -- flip around X axis
'y' -- flip around Y axis
'b' -- toggle between normal, forced-on and forced-off antialiasing

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

13 years agosupport BW text
reed@google.com [Tue, 5 Apr 2011 13:05:32 +0000 (13:05 +0000)]
support BW text

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

13 years agohandle scale < 0 for stroke-rects
reed@google.com [Tue, 5 Apr 2011 13:05:18 +0000 (13:05 +0000)]
handle scale < 0 for stroke-rects

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

13 years agoalways flush accumulated draws before we purge the font cache
reed@google.com [Mon, 4 Apr 2011 20:06:59 +0000 (20:06 +0000)]
always flush accumulated draws before we purge the font cache

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

13 years ago[PDF] Make the NOT_IMPLEMENTED macro not print anything by default.
vandebo@chromium.org [Mon, 4 Apr 2011 19:46:31 +0000 (19:46 +0000)]
[PDF] Make the NOT_IMPLEMENTED macro not print anything by default.

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

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

13 years agoreenable fast stroked rects, now that we correctly handle non-square scale
reed@google.com [Mon, 4 Apr 2011 18:58:05 +0000 (18:58 +0000)]
reenable fast stroked rects, now that we correctly handle non-square scale
also, degenerate non-antialias rectangles now draw properly

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

13 years agoexport GrDefaultPathRenderer/GrPathRenderer
bsalomon@google.com [Mon, 4 Apr 2011 18:45:32 +0000 (18:45 +0000)]
export GrDefaultPathRenderer/GrPathRenderer

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

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

13 years agotemporarily disable fast stroking, until we handle non-square scales in matrix
reed@google.com [Mon, 4 Apr 2011 18:19:29 +0000 (18:19 +0000)]
temporarily disable fast stroking, until we handle non-square scales in matrix

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

13 years agomove trimStorage to outer scope, so its memory is still valid later on when
reed@google.com [Mon, 4 Apr 2011 18:15:49 +0000 (18:15 +0000)]
move trimStorage to outer scope, so its memory is still valid later on when
we reference the newly assigned src pixels.

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

13 years agoRemove dependence on platform GL headers. Remove code that attempts to infer GL funct...
bsalomon@google.com [Mon, 4 Apr 2011 17:13:52 +0000 (17:13 +0000)]
Remove dependence on platform GL headers. Remove code that attempts to infer GL function pointers on various platforms. Instead add platform-specific implementations for Windows and Mac. (GLX coming)

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

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

13 years agorebaseline antialiased stroked rects with faster code-path (and more accurate)
reed@google.com [Mon, 4 Apr 2011 14:49:38 +0000 (14:49 +0000)]
rebaseline antialiased stroked rects with faster code-path (and more accurate)

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

13 years agoadd #ifdef SK_DISABLE_FAST_AA_STROKE_RECT to disable new 8x faster antialiased
reed@google.com [Mon, 4 Apr 2011 14:47:09 +0000 (14:47 +0000)]
add #ifdef SK_DISABLE_FAST_AA_STROKE_RECT to disable new 8x faster antialiased
stroked rects, since it draws slightly different (more correct) pixels, for
clients that want pixel compatibility.

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

13 years agofaster stroke rects
mike@reedtribe.org [Mon, 4 Apr 2011 14:38:12 +0000 (14:38 +0000)]
faster stroke rects

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

13 years agoadd baseline images for strokerects
reed@google.com [Mon, 4 Apr 2011 14:33:57 +0000 (14:33 +0000)]
add baseline images for strokerects

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

13 years agoadd strokerects to gm
reed@google.com [Mon, 4 Apr 2011 14:31:36 +0000 (14:31 +0000)]
add strokerects to gm
output current bench settings

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

13 years agoRemove SkMetaData from makefile.
scroggo [Mon, 4 Apr 2011 13:02:19 +0000 (13:02 +0000)]
Remove SkMetaData from makefile.

This makefile is used to build the sample app on
unix.  The file is not needed, and prevents the
build from working.

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

13 years agoadd 2 stroke tests to rects
mike@reedtribe.org [Sat, 2 Apr 2011 13:37:23 +0000 (13:37 +0000)]
add 2 stroke tests to rects

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

13 years agoadd pixelref->readPixels()
reed@google.com [Fri, 1 Apr 2011 19:05:36 +0000 (19:05 +0000)]
add pixelref->readPixels()

unimplemented (for now) on the gpu side

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

13 years agoFix crash when codec not found for SampleDecode
bsalomon@google.com [Fri, 1 Apr 2011 18:43:22 +0000 (18:43 +0000)]
Fix crash when codec not found for SampleDecode

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

13 years agoMove where compression enable/disable is done to make recompilation faster.
vandebo@chromium.org [Fri, 1 Apr 2011 18:33:22 +0000 (18:33 +0000)]
Move where compression enable/disable is done to make recompilation faster.

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

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

13 years agofix mac build of gr unit test
bsalomon@google.com [Fri, 1 Apr 2011 14:51:07 +0000 (14:51 +0000)]
fix mac build of gr unit test

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

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

13 years agoadd () to fix warning
reed@google.com [Fri, 1 Apr 2011 14:30:00 +0000 (14:30 +0000)]
add () to fix warning

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

13 years agoAdd src/core include for pdf project.
ctguil@chromium.org [Thu, 31 Mar 2011 23:17:05 +0000 (23:17 +0000)]
Add src/core include for pdf project.
Review URL: http://codereview.appspot.com/4331053

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

13 years agoRefactoring the GrGpuGLShaders2 into 2 classes: GrGpuGLShaders
junov@google.com [Thu, 31 Mar 2011 21:26:24 +0000 (21:26 +0000)]
Refactoring the GrGpuGLShaders2 into 2 classes: GrGpuGLShaders
and GrGLProgram.  The change also contains stubs and placeholders for GrEffect
(work in progress), which will extend shader and rendering capabilities in
Ganesh.  The hash keys for the program cache table have been modified to be able
to accomodate variable-length keys, which will be required for GrEffect support.

Code review: http://codereview.appspot.com/4309045/

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

13 years agoadd code to test different premul techniques (disabled right now)
reed@google.com [Wed, 30 Mar 2011 22:34:45 +0000 (22:34 +0000)]
add code to test different premul techniques (disabled right now)

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

13 years agoAdd pdf to skia.gyp and checkin a snap of GYP.
bsalomon@google.com [Wed, 30 Mar 2011 22:04:53 +0000 (22:04 +0000)]
Add pdf to skia.gyp and checkin a snap of GYP.

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

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

13 years agoFix signed/unsigned warnings in debug build in flushStencil()
bsalomon@google.com [Wed, 30 Mar 2011 21:43:04 +0000 (21:43 +0000)]
Fix signed/unsigned warnings in debug build in flushStencil()

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

13 years agoAdd GrResource.cpp to gr_files.mk
bsalomon@google.com [Wed, 30 Mar 2011 21:31:12 +0000 (21:31 +0000)]
Add GrResource.cpp to gr_files.mk

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

13 years agoAdd GrResource base class for ibs, texs, vbs, etc.
bsalomon@google.com [Wed, 30 Mar 2011 21:26:44 +0000 (21:26 +0000)]
Add GrResource base class for ibs, texs, vbs, etc.
Add lostContext() to GrContext.

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

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

13 years agoreplace SkRefDict with SkMetaData (much more general)
reed@google.com [Wed, 30 Mar 2011 21:23:07 +0000 (21:23 +0000)]
replace SkRefDict with SkMetaData (much more general)

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

13 years agoPrepend SkAdvancedTypefaceMetrics on enum usage.
ctguil@chromium.org [Wed, 30 Mar 2011 20:41:16 +0000 (20:41 +0000)]
Prepend SkAdvancedTypefaceMetrics on enum usage.
Review URL: http://codereview.appspot.com/4321047

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

13 years agoAdditional SK_API annotations needed for print preview on windows.
ctguil@chromium.org [Wed, 30 Mar 2011 20:14:49 +0000 (20:14 +0000)]
Additional SK_API annotations needed for print preview on windows.
Review URL: http://codereview.appspot.com/4324042

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

13 years agoadd SkMetaData
reed@google.com [Wed, 30 Mar 2011 18:41:41 +0000 (18:41 +0000)]
add SkMetaData

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

13 years agoImprove the SkAdvancedTypefaceMetrics interface w.r.t. vertical advances.
vandebo@chromium.org [Wed, 30 Mar 2011 18:36:29 +0000 (18:36 +0000)]
Improve the SkAdvancedTypefaceMetrics interface w.r.t. vertical advances.

Add a template function to type safe-combine bits of a bit field.

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

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

13 years agoadd refcnt helper to metadata
reed@google.com [Wed, 30 Mar 2011 18:23:21 +0000 (18:23 +0000)]
add refcnt helper to metadata
add unittests for metadata

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

13 years agomove SkMetaData into core
reed@google.com [Wed, 30 Mar 2011 17:10:42 +0000 (17:10 +0000)]
move SkMetaData into core

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

13 years agoadd new file GrPathUtils.cpp
reed@google.com [Wed, 30 Mar 2011 17:06:19 +0000 (17:06 +0000)]
add new file GrPathUtils.cpp

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

13 years agoadd getTopLayer(), so clients don't have to use a LayerIter just to get
reed@google.com [Wed, 30 Mar 2011 00:18:03 +0000 (00:18 +0000)]
add getTopLayer(), so clients don't have to use a LayerIter just to get
the top. (very common for chrome)

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

13 years agoFix ref leak on GrGpu.
bsalomon@google.com [Tue, 29 Mar 2011 20:52:23 +0000 (20:52 +0000)]
Fix ref leak on GrGpu.

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

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

13 years agoTwo optimizations for the tesselated path renderer:
senorblanco@chromium.org [Tue, 29 Mar 2011 17:42:30 +0000 (17:42 +0000)]
Two optimizations for the tesselated path renderer:

1)  If the path contains a single convex subpath, and we're not using inverted
fill modes, skip the tesselation and draw the interpolated path as a triangle
fan directly.
2)  Use GrDrawTarget.set*SourceToArray(), rather than creating a new
AutoReleaseGeometry, saving a copy of the vertex and index data.

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

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

13 years agoThis CL implements a tesselated path renderer, using GLU's libtess. All of the
senorblanco@chromium.org [Mon, 28 Mar 2011 20:47:09 +0000 (20:47 +0000)]
This CL implements a tesselated path renderer, using GLU's libtess.  All of the
fill modes except hairline are supported.  Note that the path renderer is not
enabled by default; to enable it, replace "GrCreatePathRenderer_none.cpp" with
"GrCreatePathRenderer_tesselated.cpp" in skia.gyp, and run gyp_skia, and build.

This change also contains a number of build fixes for Win32 (for building
SampleApp on VS2008) and Mac (for my ancient Mac Pro which supports
GL_EXT_framebuffer_object but not GL_ARB_framebuffer_object).  Also,
priorityq-heap.c was removed from the SampleApp build, since it's #included by
priorityq.c (weird, I know).

NB:  When this change is rolled into chrome, some modifications to chromium's
skia.gyp will be necessary.

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

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

13 years agoStore content streams in an SkStream instead of an SkString (64k size limit).
vandebo@chromium.org [Mon, 28 Mar 2011 19:03:50 +0000 (19:03 +0000)]
Store content streams in an SkStream instead of an SkString (64k size limit).

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

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

13 years agoadd experimental Relay class
reed@google.com [Mon, 28 Mar 2011 03:47:18 +0000 (03:47 +0000)]
add experimental Relay class

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

13 years agoHairline stroke 1px wide paths.
bsalomon@google.com [Fri, 25 Mar 2011 18:04:43 +0000 (18:04 +0000)]
Hairline stroke 1px wide paths.

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

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

13 years agoAdd the GLU tesselator source files to third_party. Add a libtess static
senorblanco@chromium.org [Fri, 25 Mar 2011 17:41:34 +0000 (17:41 +0000)]
Add the GLU tesselator source files to third_party.  Add a libtess static
library build target to the .gyp file (not required by any executable yet).  Fix
some build errors with SampleApp on Linux and Win32.  Add a gyp_skia python
script which invokes gyp with the correct arguments, and is recursively callable
by the Makefile when skia.gyp is changed.

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

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

13 years agoadd dox for drawPath, describing how to interpret the prePathMatrix.
reed@google.com [Fri, 25 Mar 2011 15:08:16 +0000 (15:08 +0000)]
add dox for drawPath, describing how to interpret the prePathMatrix.

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

13 years agoAdd way to determine at link time what path renderer will be used.
bsalomon@google.com [Fri, 25 Mar 2011 12:31:16 +0000 (12:31 +0000)]
Add way to determine at link time what path renderer will be used.
Added mechanism for a custom path renderer to punt and fallback to default path renderer

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

13 years agoRemove optional impl for SkClampMax that relied on not wrapping, as in fact
reed@google.com [Thu, 24 Mar 2011 19:17:31 +0000 (19:17 +0000)]
Remove optional impl for SkClampMax that relied on not wrapping, as in fact
we do sometimes (e.g. gradients).

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

13 years agoMove zoomer into SampleApp
Scroggo [Thu, 24 Mar 2011 18:35:50 +0000 (18:35 +0000)]
Move zoomer into SampleApp

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

13 years agoFix direct-to-stencil clippath rendering logic in GrGpu.
bsalomon@google.com [Thu, 24 Mar 2011 16:55:45 +0000 (16:55 +0000)]
Fix direct-to-stencil clippath rendering logic in GrGpu.

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

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

13 years agoRename flag that disables stencil buffer creation
bsalomon@google.com [Thu, 24 Mar 2011 16:14:10 +0000 (16:14 +0000)]
Rename flag that disables stencil buffer creation
Review URL: http://codereview.appspot.com/4273103/

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

13 years agoFix a crash.
scroggo [Wed, 23 Mar 2011 15:04:26 +0000 (15:04 +0000)]
Fix a crash.

http://codereview.appspot.com/4272065/

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

13 years agoInitialize fClip in SkBounder, in case doIRect() is called before it is used
reed@google.com [Wed, 23 Mar 2011 13:51:55 +0000 (13:51 +0000)]
Initialize fClip in SkBounder, in case doIRect() is called before it is used
inside a canvas (which calls setClip).

Export a global empty region. Used by SkBounder's constructor.

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

13 years agoAdd GL_CHROMIUM_framebuffer_multisample support.
bsalomon@google.com [Wed, 23 Mar 2011 13:50:34 +0000 (13:50 +0000)]
Add GL_CHROMIUM_framebuffer_multisample support.

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

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

13 years agoFix SK build macro.
bsalomon@google.com [Tue, 22 Mar 2011 20:53:31 +0000 (20:53 +0000)]
Fix SK build macro.

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

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

13 years agoinline knowledge that our pointsize is always 1 when we measure/draw
reed@google.com [Tue, 22 Mar 2011 19:49:08 +0000 (19:49 +0000)]
inline knowledge that our pointsize is always 1 when we measure/draw

#ifdef protect 10.6 or later APIs (not available on 10.5)

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

13 years agoadd GR at the end
reed@google.com [Tue, 22 Mar 2011 17:49:13 +0000 (17:49 +0000)]
add GR at the end

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