platform/upstream/libSkiaSharp.git
13 years agoadd GPU config
mike@reedtribe.org [Tue, 17 May 2011 02:25:05 +0000 (02:25 +0000)]
add GPU config

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

13 years agoUse SkSetFourByteTag in SkFontHost_win.cpp.
ctguil@chromium.org [Mon, 16 May 2011 22:00:05 +0000 (22:00 +0000)]
Use SkSetFourByteTag in SkFontHost_win.cpp.
Review URL: http://codereview.appspot.com/4535075

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

13 years agoseparate coverage stages from color stages.
bsalomon@google.com [Mon, 16 May 2011 20:56:06 +0000 (20:56 +0000)]
separate coverage stages from color stages.

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

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

13 years agoremove dead files
reed@google.com [Mon, 16 May 2011 19:15:16 +0000 (19:15 +0000)]
remove dead files

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

13 years agoFixed color bleeding issue when drawing a sub region of a bitmap with filtering enabled.
junov@google.com [Mon, 16 May 2011 18:32:07 +0000 (18:32 +0000)]
Fixed color bleeding issue when drawing a sub region of a bitmap with filtering enabled.
Problem was resolved by adding the notion of a custom texture domain in generated shaders, when necessary.

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

13 years agofully expand the initialization for rect (android compiler didn't like {0})
reed@google.com [Mon, 16 May 2011 18:24:19 +0000 (18:24 +0000)]
fully expand the initialization for rect (android compiler didn't like {0})

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

13 years agouse SkPath for GrPath, removing GrPathIter entirely
reed@google.com [Mon, 16 May 2011 17:21:57 +0000 (17:21 +0000)]
use SkPath for GrPath, removing GrPathIter entirely

http://codereview.appspot.com/4515071/

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

13 years agoFix winding order check for negative scale in tesselated path rendering. The
senorblanco@chromium.org [Mon, 16 May 2011 16:59:57 +0000 (16:59 +0000)]
Fix winding order check for negative scale in tesselated path rendering.  The
isCCW() code in GrTesselatedPathRenderer was using untransformed vertices,
which fails for transforms with negative scale.  Doing the check after
transformation fixes it.  This was causing some missing geometry in the
PolyToPoly and Shapes tests in SampleApp.

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

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

13 years agoChange getConvexity() to now compute it if the value is set to kUnkown.
reed@google.com [Mon, 16 May 2011 14:16:04 +0000 (14:16 +0000)]
Change getConvexity() to now compute it if the value is set to kUnkown.
Change behavior for degenerate paths: now those return kConvex instead of kUnknown

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

13 years agoUpload matrix as gl float rather than gr scalar (fixes a build break when scalar...
bsalomon@google.com [Mon, 16 May 2011 13:14:03 +0000 (13:14 +0000)]
Upload matrix as gl float rather than gr scalar (fixes a build break when scalar==fixed)

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

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

13 years agoOptimize colorfilter path when using a constant color.\nReviewed at http://codereview...
Scroggo [Mon, 16 May 2011 13:11:16 +0000 (13:11 +0000)]
Optimize colorfilter path when using a constant color.\nReviewed at codereview.appspot.com/4548041/

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

13 years agoclean up sign detection code in computeconvexity
reed@google.com [Mon, 16 May 2011 12:29:27 +0000 (12:29 +0000)]
clean up sign detection code in computeconvexity

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

13 years agodetect more than one loop in computeconvexity
reed@google.com [Sun, 15 May 2011 20:25:17 +0000 (20:25 +0000)]
detect more than one loop in computeconvexity

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

13 years agomigrate more tests from GrPath.cpp
reed@google.com [Sun, 15 May 2011 04:38:34 +0000 (04:38 +0000)]
migrate more tests from GrPath.cpp

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

13 years agoadd Convexity enum to SkPath
reed@google.com [Sun, 15 May 2011 04:08:24 +0000 (04:08 +0000)]
add Convexity enum to SkPath

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

13 years agomake tests return nonzero if failing
epoger@google.com [Fri, 13 May 2011 19:26:48 +0000 (19:26 +0000)]
make tests return nonzero if failing

http://codereview.appspot.com/4545042/

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

13 years agoAnother tiny comment-only change to trigger buildbot
epoger@google.com [Fri, 13 May 2011 15:15:11 +0000 (15:15 +0000)]
Another tiny comment-only change to trigger buildbot

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

13 years agoTiny comment-only change to trigger buildbot
epoger@google.com [Fri, 13 May 2011 15:01:59 +0000 (15:01 +0000)]
Tiny comment-only change to trigger buildbot

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

13 years ago[PDF] Add support for SrcIn, SrcOut, DstIn, DstOut xfermodes.
vandebo@chromium.org [Fri, 13 May 2011 03:50:38 +0000 (03:50 +0000)]
[PDF] Add support for SrcIn, SrcOut, DstIn, DstOut xfermodes.

This change uses the soft mask (aka soft clip) functionality of PDF to implement the xfermodes.  It has to put existing content (dst) into a form xobject as well as putting the new (src) content into a different form xobject.  It then draws one of them with the other as the soft mask.
To accomplish this, we add a call to finishContentEntry after each call to setUpContentEntry - this is kind of a hack, but I don't see a better way to extract src.
Unfortunately, soft mask is specified in the Graphic State PDF object (and not in the form xobject), so when handling one of these modes, we add a one time GS object to set the soft mask and invoke a simple GS to reset the soft mask when done.

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

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

13 years ago[PDF] Fix windows SkFontHost::OpenStream for TTC fonts.
vandebo@chromium.org [Fri, 13 May 2011 03:41:29 +0000 (03:41 +0000)]
[PDF] Fix windows SkFontHost::OpenStream for TTC fonts.

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

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

13 years agoupdate dox
reed@google.com [Thu, 12 May 2011 22:31:01 +0000 (22:31 +0000)]
update dox

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

13 years agoadd 'p' to toggle on/off testing the pipe
reed@google.com [Thu, 12 May 2011 22:08:24 +0000 (22:08 +0000)]
add 'p' to toggle on/off testing the pipe

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

13 years agoDisable blend for edge AA not general AA
bsalomon@google.com [Thu, 12 May 2011 20:34:19 +0000 (20:34 +0000)]
Disable blend for edge AA not general AA

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

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

13 years agoStyle fix
Scroggo [Thu, 12 May 2011 18:27:05 +0000 (18:27 +0000)]
Style fix

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

13 years agoEdge antialiasing for convex shapes in Ganesh
senorblanco@chromium.org [Thu, 12 May 2011 15:49:15 +0000 (15:49 +0000)]
Edge antialiasing for convex shapes in Ganesh

This patch implements edge antialiasing for convex shapes, using the fragment
shader to compare against the edge equations for each triangle.  Currently, it
only works for flat shaded primitives (i.e., it was not integrated into the
"active stages" path).  The skia.gyp changes cause this code to be compiled into
SampleApp, but do not enable the tesselated path by default.

Notes:  the SkOSWindow_Unix.cpp change is to silence a valgrind warning about
memcpy() with overlapping regions.  The GrBinHashKey change is to avoid running
a two-pass hash (GrProgramDesc is now 52 bytes or so, exceeding the 32 byte
default size).

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

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

13 years agoFix intentional breakage in previous commit
epoger@google.com [Thu, 12 May 2011 13:50:57 +0000 (13:50 +0000)]
Fix intentional breakage in previous commit

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

13 years agoIntentional breakage to test notifications, will fix quickly
epoger@google.com [Thu, 12 May 2011 13:48:24 +0000 (13:48 +0000)]
Intentional breakage to test notifications, will fix quickly

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

13 years agoTiny comment-only change to trigger update
epoger@google.com [Thu, 12 May 2011 13:39:43 +0000 (13:39 +0000)]
Tiny comment-only change to trigger update

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

13 years agocleanup previous array of paints
reed@google.com [Thu, 12 May 2011 03:03:56 +0000 (03:03 +0000)]
cleanup previous array of paints

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

13 years agoAllow blending if there is a color filter.
Scroggo [Wed, 11 May 2011 20:25:01 +0000 (20:25 +0000)]
Allow blending if there is a color filter.

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

13 years agoAdd space between mediump and float in 2pt radial vertex uniform decl
bsalomon@google.com [Wed, 11 May 2011 19:00:54 +0000 (19:00 +0000)]
Add space between mediump and float in 2pt radial vertex uniform decl

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

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

13 years agoFix my intentional break.
epoger@google.com [Wed, 11 May 2011 18:51:01 +0000 (18:51 +0000)]
Fix my intentional break.

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

13 years ago[PDF] Fix Chrome crash - don't assume that SkDraw.fClipStack != NULL.
vandebo@chromium.org [Wed, 11 May 2011 18:46:03 +0000 (18:46 +0000)]
[PDF] Fix Chrome crash - don't assume that SkDraw.fClipStack != NULL.

Chrome bug is crbug.com/82198.

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

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

13 years agoIntentionally break tests, will fix quickly.
epoger@google.com [Wed, 11 May 2011 18:45:12 +0000 (18:45 +0000)]
Intentionally break tests, will fix quickly.

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

13 years agoAnother comment-only change to test notifications
epoger@google.com [Wed, 11 May 2011 18:32:30 +0000 (18:32 +0000)]
Another comment-only change to test notifications

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

13 years agoRemove a warning.
Scroggo [Wed, 11 May 2011 18:16:56 +0000 (18:16 +0000)]
Remove a warning.

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

13 years agoTiny comment-only change to test notifications
epoger@google.com [Wed, 11 May 2011 18:10:18 +0000 (18:10 +0000)]
Tiny comment-only change to test notifications

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

13 years agoStore 1/255 as a constant to reduce number of divides.
Scroggo [Wed, 11 May 2011 18:05:38 +0000 (18:05 +0000)]
Store 1/255 as a constant to reduce number of divides.

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

13 years agoRemove dead debug code.
bsalomon@google.com [Wed, 11 May 2011 17:29:58 +0000 (17:29 +0000)]
Remove dead debug code.

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

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

13 years agoRemove unused variable.
Scroggo [Wed, 11 May 2011 17:04:25 +0000 (17:04 +0000)]
Remove unused variable.

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

13 years agoKeep program cache consistent when program creation fails.
bsalomon@google.com [Wed, 11 May 2011 16:52:59 +0000 (16:52 +0000)]
Keep program cache consistent when program creation fails.

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

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

13 years agoAdd color filters to gpu path.
Scroggo [Wed, 11 May 2011 14:05:25 +0000 (14:05 +0000)]
Add color filters to gpu path.

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

13 years agoremove some dead code in pipes
reed@google.com [Wed, 11 May 2011 05:58:58 +0000 (05:58 +0000)]
remove some dead code in pipes
inherit from SampleView for more samples
add L key to toggle using SkGPipe

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

13 years agoadd include/core to header path for release build
reed@google.com [Wed, 11 May 2011 05:10:16 +0000 (05:10 +0000)]
add include/core to header path for release build

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

13 years agocheck-point for pipe: flatten/unflatten objects for single paint
reed@google.com [Wed, 11 May 2011 00:42:04 +0000 (00:42 +0000)]
check-point for pipe: flatten/unflatten objects for single paint
still need replacement policy

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

13 years ago[PDF] Fix ending condition for font advance construction.
vandebo@chromium.org [Tue, 10 May 2011 23:25:03 +0000 (23:25 +0000)]
[PDF] Fix ending condition for font advance construction.

The old code always ended (the last sequence of glyphs) on a range, even if there was a very long run at the end.  This fixes that.

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

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

13 years agogit-svn-id: http://skia.googlecode.com/svn/trunk@1292 2bbb7eff-a529-9590-31e7-b0007b4...
twiz@google.com [Tue, 10 May 2011 23:10:26 +0000 (23:10 +0000)]
git-svn-id: skia.googlecode.com/svn/trunk@1292 2bbb7eff-a529-9590-31e7-b0007b416f81

13 years agoadd master images for macbook (which differ in the gpu variant from gm/base)
reed@google.com [Tue, 10 May 2011 22:59:06 +0000 (22:59 +0000)]
add master images for macbook (which differ in the gpu variant from gm/base)

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

13 years agofix bug where we wrote uninitialized data to the flatten stream for shaders.
reed@google.com [Tue, 10 May 2011 22:56:42 +0000 (22:56 +0000)]
fix bug where we wrote uninitialized data to the flatten stream for shaders.

Both shader and gradient_shader write matrices to the flatten stream. However, they were
just calling write(&matrix, sizeof(SkMatrix)) and the matrix can contain lazily-computed
function ptrs as part of its internal cache. Thus two matrices that are logically the
same may write different bytes.

This is a problem because picture relies on flattening objects and then using the
flatten stream as a key into its cache. This matrix-write bug effectively kills the
effectiveness of the cache for shaders.

The fix is to write proper read/write functions for matrix (and region btw). These
call through to the existing low-level flatten routines (which just write into a
memory ptr).

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

13 years agoMake GrMatrix an alias of SkMatrix. Add new methods to SkMatrix.
bsalomon@google.com [Tue, 10 May 2011 13:52:42 +0000 (13:52 +0000)]
Make GrMatrix an alias of SkMatrix. Add new methods to SkMatrix.

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

Checked in on behalf of reed@ with some additional work (remove the do-nother sk->gr matrix converter).

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

13 years agoFixes from Sk/Gr rect unification.
bsalomon@google.com [Mon, 9 May 2011 22:32:52 +0000 (22:32 +0000)]
Fixes from Sk/Gr rect unification.

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

13 years agocheck for missing filename (needs to be specified when tool is launched)
reed@google.com [Mon, 9 May 2011 21:59:56 +0000 (21:59 +0000)]
check for missing filename (needs to be specified when tool is launched)

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

13 years agoremove unneeded asserts (which may fail from imprecise blits into the bitmap, but
reed@google.com [Mon, 9 May 2011 21:59:30 +0000 (21:59 +0000)]
remove unneeded asserts (which may fail from imprecise blits into the bitmap, but
do not affect the blits at head)

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

13 years agoFix unused var warning
bsalomon@google.com [Mon, 9 May 2011 20:47:34 +0000 (20:47 +0000)]
Fix unused var warning

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

13 years agoFixup old VS2010 project in case anyone is using it
bsalomon@google.com [Mon, 9 May 2011 18:53:14 +0000 (18:53 +0000)]
Fixup old VS2010 project in case anyone is using it

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

13 years agoremove deleted include file (oops)
bsalomon@google.com [Mon, 9 May 2011 18:50:47 +0000 (18:50 +0000)]
remove deleted include file (oops)

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

13 years agoRemove previous shader generator class. No longer compiles due to elimination of...
bsalomon@google.com [Mon, 9 May 2011 18:44:52 +0000 (18:44 +0000)]
Remove previous shader generator class. No longer compiles due to elimination of separate GrStringBuilder class in favor or SkString.

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

13 years agoMake shader generator more legible. Get rid of some magic values.
bsalomon@google.com [Mon, 9 May 2011 18:39:58 +0000 (18:39 +0000)]
Make shader generator more legible. Get rid of some magic values.

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

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

13 years ago[PDF] Add a ToUnicode mapping for fonts.
vandebo@chromium.org [Mon, 9 May 2011 18:13:47 +0000 (18:13 +0000)]
[PDF] Add a ToUnicode mapping for fonts.

This makes text in PDFs searchable and copy&paste-able.

Code from arthurhsu@chromium.org.  Original review: http://codereview.appspot.com/4428082/

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

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

13 years ago[PDF] (regression) Update font if size changes.
vandebo@chromium.org [Mon, 9 May 2011 17:36:36 +0000 (17:36 +0000)]
[PDF] (regression) Update font if size changes.

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

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

13 years ago[PDF] Fix bug in graphic state comparison.
vandebo@chromium.org [Mon, 9 May 2011 17:34:19 +0000 (17:34 +0000)]
[PDF] Fix bug in graphic state comparison.

SkPDFGraphicState::GSCanonicalEntry::operator== was out of sync with SkPDFGraphicState::populateDict  leading to graphic state objects with the same value.

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

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

13 years agoShare code with SkRect
reed@google.com [Mon, 9 May 2011 17:00:02 +0000 (17:00 +0000)]
Share code with SkRect

http://codereview.appspot.com/4523046/

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

13 years agoremove #if 0 code
reed@google.com [Mon, 9 May 2011 13:37:36 +0000 (13:37 +0000)]
remove #if 0 code

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

13 years agoSuppress int/NULL comparison warning
bsalomon@google.com [Mon, 9 May 2011 13:28:55 +0000 (13:28 +0000)]
Suppress int/NULL comparison warning

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

13 years ago[PDF] Add support for Clear, Src, Dst, DstOver xfermodes.
vandebo@chromium.org [Mon, 9 May 2011 08:05:01 +0000 (08:05 +0000)]
[PDF] Add support for Clear, Src, Dst, DstOver xfermodes.

This uses the refactoring in http://codereview.appspot.com/4459041/ to add support for additional xfer modes.  Calling setupContentEntry may affect previous content entries (removing, reordering, or modifying their clip) and indicates to the caller if it should draw the new item or not.

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

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

13 years ago[PDF] Fix setting of existing clip for layers.
vandebo@chromium.org [Mon, 9 May 2011 07:58:08 +0000 (07:58 +0000)]
[PDF] Fix setting of existing clip for layers.

The current approach of setting the existing clip just before drawing a layer into a device doesn't work.  SkDevice::clear() uses existing clip before that and if we need to put the content in a transparency group (i.e. for SrcIn xfermode), we need a valid existing clip.  Instead, change the factory to use a special constructor when creating a layer device.

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

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

13 years ago[PDF] Refactor content stream creation in SkPDFDevice to support more xfermodes.
vandebo@chromium.org [Mon, 9 May 2011 07:55:58 +0000 (07:55 +0000)]
[PDF] Refactor content stream creation in SkPDFDevice to support more xfermodes.

Instead of writing all drawing and state updates into the final content stream immediately, this change creates a new ContentEntry each time the transform, clip, or paint changes.  Drawing is done into a stream in the ContentEntry.  When the consumer asks for the content, we combine all the ContentEntries with appropriate updates to the state (clip, transform, paint) in between.  This allows us to modify the clip even after a drawing has completed.  It also lets us remove ContentEntries with no drawing.  Further optimization can be done to better use the stack features of PDF, for now we follow the previous model of having a single clip followed by a single transform on the graphic state stack.

Push rectangle logic into SkPDFUtil::AppendRectangle.
Change private functions to adhere to coding standards.

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

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

13 years agouse SkPoint, creating an alias for GrPoint
reed@google.com [Fri, 6 May 2011 19:26:26 +0000 (19:26 +0000)]
use SkPoint, creating an alias for GrPoint

http://codereview.appspot.com/4498041/

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

13 years agoshare macros and types with SkScalar, but keep aliases for now, to avoid editing
reed@google.com [Fri, 6 May 2011 17:30:45 +0000 (17:30 +0000)]
share macros and types with SkScalar, but keep aliases for now, to avoid editing
call sites.

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

13 years agoReplace GrStringBuilder with SkString. First step in cleaning up the shader generator...
bsalomon@google.com [Fri, 6 May 2011 13:53:47 +0000 (13:53 +0000)]
Replace GrStringBuilder with SkString. First step in cleaning up the shader generator. Slight performance hit when creating a new shader (<10% of total shader gen time on my Windows box is spent in building our string before handing it to GL). Much of this can be recovered by better usage pattern of SkString in coming revisions.

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

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

13 years agoremove unused var, fixes warning
bsalomon@google.com [Fri, 6 May 2011 13:12:38 +0000 (13:12 +0000)]
remove unused var, fixes warning

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

13 years agoTab -> spaces
bsalomon@google.com [Fri, 6 May 2011 13:02:10 +0000 (13:02 +0000)]
Tab -> spaces

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

13 years agoadd SkScalarIsInt()
reed@google.com [Fri, 6 May 2011 12:18:08 +0000 (12:18 +0000)]
add SkScalarIsInt()

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

13 years agoFix some fixed-width CJK
reed@google.com [Fri, 6 May 2011 11:49:30 +0000 (11:49 +0000)]
Fix some fixed-width CJK

http://code.google.com/p/skia/issues/detail?id=222

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

13 years agoadd
reed@google.com [Thu, 5 May 2011 20:05:10 +0000 (20:05 +0000)]
add

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

13 years agodon't require a ptr unless size > 0
reed@google.com [Thu, 5 May 2011 20:04:44 +0000 (20:04 +0000)]
don't require a ptr unless size > 0

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

13 years agoDisable MSAA in SkOsWindow on mac and windows
bsalomon@google.com [Thu, 5 May 2011 15:39:15 +0000 (15:39 +0000)]
Disable MSAA in SkOsWindow on mac and windows

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

13 years agoupdate
reed@google.com [Thu, 5 May 2011 15:18:15 +0000 (15:18 +0000)]
update

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

13 years agocorrectly compute coverage when an antialiased rect covers only 1 column of pixels
reed@google.com [Thu, 5 May 2011 14:24:47 +0000 (14:24 +0000)]
correctly compute coverage when an antialiased rect covers only 1 column of pixels

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

13 years agoinherit from SampleView
reed@google.com [Thu, 5 May 2011 14:12:36 +0000 (14:12 +0000)]
inherit from SampleView

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

13 years agoupdate for glshaders-not-2
reed@google.com [Thu, 5 May 2011 14:10:16 +0000 (14:10 +0000)]
update for glshaders-not-2

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

13 years agodisable experimental TEST_GPIPE
reed@google.com [Thu, 5 May 2011 14:07:35 +0000 (14:07 +0000)]
disable experimental TEST_GPIPE

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

13 years agoupdate to SampleView
reed@google.com [Thu, 5 May 2011 14:03:48 +0000 (14:03 +0000)]
update to SampleView

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

13 years agoSwitch to GrGpuGLShaders (instead of GrGpuGLShaders2).
bsalomon@google.com [Thu, 5 May 2011 12:39:20 +0000 (12:39 +0000)]
Switch to GrGpuGLShaders (instead of GrGpuGLShaders2).

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

13 years agoAdd 4x4 downsample filter with 4 bilinear texture reads, use for ssaa.
bsalomon@google.com [Thu, 5 May 2011 12:33:22 +0000 (12:33 +0000)]
Add 4x4 downsample filter with 4 bilinear texture reads, use for ssaa.

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

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

13 years agoswitch to inheriting from SampleView
mike@reedtribe.org [Thu, 5 May 2011 01:59:48 +0000 (01:59 +0000)]
switch to inheriting from SampleView

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

13 years agoRemove GrPrintf_printf from gyp (should be using GrPrintf_skia that is already includ...
bsalomon@google.com [Wed, 4 May 2011 20:18:04 +0000 (20:18 +0000)]
Remove GrPrintf_printf from gyp (should be using GrPrintf_skia that is already included in the skgr lib to direct GrPrintf to SkDebugf).

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

13 years agoSampleApp builds skia on Linux with BGRA pixel order, but Ganesh's SampleApp
senorblanco@chromium.org [Wed, 4 May 2011 20:12:01 +0000 (20:12 +0000)]
SampleApp builds skia on Linux with BGRA pixel order, but Ganesh's SampleApp
assumes GL_RGBA texture format on all platforms except Windows (where it uses
GL_BGRA), so texture colours come out wrong.  As a temporary fix, do on Linux
what we do on Windows, and assume GL_BGRA.  (This should be made more general
later, and the assumption of matching formats between Skia and Ganesh removed.)

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

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

13 years agoFix SampleApp raster path on Linux to use SK_SAMPLES_FOR_X, so pixel components
senorblanco@chromium.org [Wed, 4 May 2011 18:59:38 +0000 (18:59 +0000)]
Fix SampleApp raster path on Linux to use SK_SAMPLES_FOR_X, so pixel components
are in the right order (RGBA vs BGRA).

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

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

13 years agoadd typeface flattening
reed@google.com [Wed, 4 May 2011 18:30:04 +0000 (18:30 +0000)]
add typeface flattening

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

13 years agoimplement (sort of) Serialize/Deserialize
reed@google.com [Wed, 4 May 2011 18:03:45 +0000 (18:03 +0000)]
implement (sort of) Serialize/Deserialize

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

13 years agoadd find()
reed@google.com [Wed, 4 May 2011 18:03:00 +0000 (18:03 +0000)]
add find()

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

13 years agoMinor fixes to get SampleApp's OpenGL path not to crash on Linux. Initialize
senorblanco@chromium.org [Wed, 4 May 2011 15:29:04 +0000 (15:29 +0000)]
Minor fixes to get SampleApp's OpenGL path not to crash on Linux.  Initialize
SkOSWindow::fGLAttched (and fVi while we're at it), since it was being checked
uninitialized.  Don't call has_gl_extension() while initializing the
GrGLDefaultInterface, since it derefs the default interface (which is still
NULL); use has_gl_extension_from_string() instead.

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

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

13 years agoFix validation (glTexEnvi is fixed pipe only)
bsalomon@google.com [Wed, 4 May 2011 15:01:16 +0000 (15:01 +0000)]
Fix validation (glTexEnvi is fixed pipe only)

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

13 years agofix precendence error (== binds tighter than &)
reed@google.com [Wed, 4 May 2011 14:43:40 +0000 (14:43 +0000)]
fix precendence error (== binds tighter than &)
add new samples to solution

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

13 years agonew samples
reed@google.com [Wed, 4 May 2011 14:34:56 +0000 (14:34 +0000)]
new samples

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

13 years agoupdate pipe test
reed@google.com [Wed, 4 May 2011 14:32:04 +0000 (14:32 +0000)]
update pipe test

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

13 years agoadd debugging test for building SkDescriptor
reed@google.com [Wed, 4 May 2011 14:31:07 +0000 (14:31 +0000)]
add debugging test for building SkDescriptor
update some samples

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

13 years agoMake the unix test app build.
scroggo [Wed, 4 May 2011 14:16:36 +0000 (14:16 +0000)]
Make the unix test app build.

There are two ways to build it, using the gyp files,
or using its own makefile.  A recent update of a
sample made it no longer build using its own makefile.
Make it build once again.

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

13 years agoremove deprecated getViewport/setViewport
reed@google.com [Wed, 4 May 2011 13:50:34 +0000 (13:50 +0000)]
remove deprecated getViewport/setViewport

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