Commit Graph

777 Commits

Author SHA1 Message Date
sugoi@google.com
a1c511b870 New SkRectShaderImageFilter image filter
This new changelist also introduces a new image filter called SkRectShaderImageFilter which is make to simply apply a shader on a region without using any inputs.

TEST=Added ShaderImageFilter test
Review URL: https://codereview.appspot.com/7300046

git-svn-id: http://skia.googlecode.com/svn/trunk@7808 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-21 15:02:28 +00:00
jvanverth@google.com
3976825a21 Remove unused texture coordinate flags.
Currently we support 5 texture stages, each with 5 possible texture coordinate attributes.
However, we only ever use one explicit texture coordinate. This change removes all but one 
(now named just "aTexCoord") of the possible explicit texture coordinates.

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


git-svn-id: http://skia.googlecode.com/svn/trunk@7737 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-14 15:25:44 +00:00
jvanverth@google.com
024e523a5f Fix for Gorilla test
My implementation of the Gorilla random number test had a bug in the code used
to track the random strings -- it was masking 6 bits instead of 5, which was
throwing off the counts. No idea how this worked on every platform except
Android.


git-svn-id: http://skia.googlecode.com/svn/trunk@7731 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-14 13:20:35 +00:00
bsalomon@google.com
73a9694b4c Use SkMWRandom in GLPrograms test.
R=jvanverth@google.com
Review URL: https://codereview.appspot.com/7306097

git-svn-id: http://skia.googlecode.com/svn/trunk@7721 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-13 16:31:19 +00:00
bsalomon@google.com
91207482c9 Move code that builds GrGLProgram::Desc to GrGLProgram. Move color and coverage flush to GrGLProgram.
Review URL: https://codereview.appspot.com/7322058

git-svn-id: http://skia.googlecode.com/svn/trunk@7708 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-12 21:45:24 +00:00
skia.committer@gmail.com
8626719107 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7688 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-09 07:05:02 +00:00
junov@chromium.org
f507c410e3 Adding option to SkTileGrid for specifying border pixels.
The purpose of this patch is to make it possible for the chromium compositor to
generate a TileGrid structure that is better suited for scaled playback.
Review URL: https://codereview.appspot.com/7300072

git-svn-id: http://skia.googlecode.com/svn/trunk@7680 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-08 21:03:30 +00:00
humper@google.com
7cacbbd98a fix build on Macos
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@7672 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-08 18:44:27 +00:00
jvanverth@google.com
897f462da5 Fix for Mac compile warnings. Temporarily removed random gorilla test.
Unreviewed


git-svn-id: http://skia.googlecode.com/svn/trunk@7671 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-08 18:28:47 +00:00
jvanverth@google.com
5a90adaf2f Add Random unit tests.
https://codereview.appspot.com/7306066/


git-svn-id: http://skia.googlecode.com/svn/trunk@7670 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-08 17:13:09 +00:00
bsalomon@google.com
85983288ba Remove compile time option to use different types for text vertices.
Review URL: https://codereview.appspot.com/7309060

git-svn-id: http://skia.googlecode.com/svn/trunk@7658 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-07 22:00:29 +00:00
robertphillips@google.com
5990397d08 Address google3 compiler warning
https://codereview.appspot.com/7308063/



git-svn-id: http://skia.googlecode.com/svn/trunk@7655 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-07 21:02:23 +00:00
djsollen@google.com
efbe8e9bed Fix errors when compiling with -Wall -Werror on Android.
This CL also turns those features on by default on Android

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

git-svn-id: http://skia.googlecode.com/svn/trunk@7645 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-07 18:58:35 +00:00
bsalomon@google.com
fec0bc3fc1 Remove legacy names no longer referenced in Chrome and WebKit.
Review URL: https://codereview.appspot.com/7311055

git-svn-id: http://skia.googlecode.com/svn/trunk@7640 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-07 14:43:04 +00:00
edisonn@google.com
a519f48783 rver r7626, might trigger for some strange reason a heap corruption
git-svn-id: http://skia.googlecode.com/svn/trunk@7631 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-06 21:42:34 +00:00
edisonn@google.com
848b9af52d Add a true Set class. Current use case is to be used with Pdf generator.
Review URL: https://codereview.appspot.com/6749054

git-svn-id: http://skia.googlecode.com/svn/trunk@7626 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-06 18:54:13 +00:00
bsalomon@google.com
9c68058b67 Fix WritePixels test on ANGLE.
Don't upload BGRA to RGBA if not supported (ES2 w/ EXT BGRA extension).

R=senorblanco@chromium.org
Review URL: https://codereview.appspot.com/7305046

git-svn-id: http://skia.googlecode.com/svn/trunk@7622 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-06 18:17:50 +00:00
senorblanco@chromium.org
3cb406bb88 Implement support for origin-TopLeft render targets. Note that the default behaviour remains the same: textures default to origin-TopLeft, render targets default to origin-BottomLeft, and backend textures default to origin-BottomLeft. However, the caller can override the default by setting fOrigin in GrTextureDesc, GrBackendTextureDesc or GrBackendRenderTargetDesc.
Review URL: https://codereview.appspot.com/7230049

git-svn-id: http://skia.googlecode.com/svn/trunk@7594 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-05 19:50:46 +00:00
scroggo@google.com
9349101b6c Implement support for origin-TopLeft render targets in GL backend.
Committed: https://code.google.com/p/skia/source/detail?r=7545

Reverted in r7571; re-opening.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@7592 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-05 19:22:27 +00:00
bsalomon@google.com
1d1d4248f6 Actually fix angle GLPrograms test.
git-svn-id: http://skia.googlecode.com/svn/trunk@7578 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-05 15:44:21 +00:00
robertphillips@google.com
cf9faf6ce9 Reverting r7545 (render target origin change) due to layout test issues (see https://codereview.chromium.org/12210002/)
git-svn-id: http://skia.googlecode.com/svn/trunk@7571 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-05 14:05:06 +00:00
bsalomon@google.com
042a2861b2 Attempt to fix GLPrograms test on ANGLE bot.
R=senorblanco@chromium.org
Review URL: https://codereview.appspot.com/7281050

git-svn-id: http://skia.googlecode.com/svn/trunk@7550 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-04 18:39:24 +00:00
senorblanco@chromium.org
ed8659b51d Implement support for origin-TopLeft render targets in GL backend.
Review URL: https://codereview.appspot.com/7230049

git-svn-id: http://skia.googlecode.com/svn/trunk@7545 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-04 17:29:51 +00:00
bsalomon@google.com
67b915de99 Make GPU unit tests use GrContexts of different GL types.
Review URL: https://codereview.appspot.com/7281046

git-svn-id: http://skia.googlecode.com/svn/trunk@7540 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-04 16:13:32 +00:00
skia.committer@gmail.com
747f1ecce6 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7499 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-31 20:28:24 +00:00
bungeman@google.com
cfcb1bef94 Add SHA1 and MD5 to utils.
https://codereview.appspot.com/7071055/


git-svn-id: http://skia.googlecode.com/svn/trunk@7496 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-31 19:47:48 +00:00
robertphillips@google.com
5b33211c5e Start addressing the clang static analyzer issues
https://codereview.appspot.com/7249043/



git-svn-id: http://skia.googlecode.com/svn/trunk@7469 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-30 20:33:12 +00:00
junov@chromium.org
e94b5e40c5 Adding a new unit test that demonstrates that dithering affects constant gradients
Related bug: crbug.com/169602
Review URL: https://codereview.appspot.com/7220063

git-svn-id: http://skia.googlecode.com/svn/trunk@7465 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-30 15:52:06 +00:00
reed@google.com
e40591d548 return if we're invertible for the fast scale+trans case when we have no inverse
matrix to return.
Review URL: https://codereview.appspot.com/7231063

git-svn-id: http://skia.googlecode.com/svn/trunk@7464 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-30 15:47:42 +00:00
junov@chromium.org
94f20dc89a Fixing crash in cloning empty SkPicture object
BUG=https://code.google.com/p/chromium/issues/detail?id=172062
TEST=Pictures unit test, test_clone_empty
Review URL: https://codereview.appspot.com/7223048

git-svn-id: http://skia.googlecode.com/svn/trunk@7430 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-28 21:04:44 +00:00
jvanverth@google.com
cc78238f0b Move vertex layout definitions from GrDrawTarget to GrDrawState.
This is the first step in revising vertex layouts so that the currently
installed GrEffects determine the current vertex layout.

https://codereview.appspot.com/7235051/


git-svn-id: http://skia.googlecode.com/svn/trunk@7423 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-28 20:39:48 +00:00
robertphillips@google.com
4991b8f234 Added toString to SkDrawLooper-derived classes
https://codereview.appspot.com/7195054/



git-svn-id: http://skia.googlecode.com/svn/trunk@7422 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-28 20:21:59 +00:00
bsalomon@google.com
adc6536fe5 Remove getter of writable GrEffectStage from GrDrawState.
Upcoming changes will require GrDrawState to know things about the set of installed effects. Thus all setting of effects must go through a GrDrawState function (setEffect()). This change accomplishes that.
Review URL: https://codereview.appspot.com/7214045

git-svn-id: http://skia.googlecode.com/svn/trunk@7411 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-28 14:26:09 +00:00
skia.committer@gmail.com
e16efc1882 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-26 07:06:02 +00:00
vandebo@chromium.org
4e1cc6ac45 [PDF] Handle invalid glyph IDs on drawText methods.
Review URL: https://codereview.appspot.com/7179053

git-svn-id: http://skia.googlecode.com/svn/trunk@7401 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-25 19:27:23 +00:00
skia.committer@gmail.com
4024f32d99 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7385 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-25 07:06:46 +00:00
bungeman@google.com
82c2fec824 Remove ConcaveToTriangles.
git-svn-id: http://skia.googlecode.com/svn/trunk@7383 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-24 22:31:01 +00:00
reed@google.com
4bbdeac58c add optional cull-rect to patheffects, so they can do less work if their results
lie outside of the current clip-bounds (the cull rect).
Review URL: https://codereview.appspot.com/7206044

git-svn-id: http://skia.googlecode.com/svn/trunk@7378 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-24 21:03:11 +00:00
reed@google.com
72aa79cfea override drawOval and drawRRect in GatherPixelRefDevice, so we don't miss those,
and possibly crash trying to raster into an empty device.

http://code.google.com/p/skia/issues/detail?id=1086
Review URL: https://codereview.appspot.com/7193057

git-svn-id: http://skia.googlecode.com/svn/trunk@7372 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-24 18:27:42 +00:00
bungeman@google.com
7c56c16322 Fix sort test.
https://codereview.appspot.com/7199050/


git-svn-id: http://skia.googlecode.com/svn/trunk@7364 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-24 15:06:47 +00:00
bsalomon@google.com
95ed55adc6 Make all GrContext members that return a texture also ref the texture for the caller.
Review URL: https://codereview.appspot.com/7198049

git-svn-id: http://skia.googlecode.com/svn/trunk@7362 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-24 14:46:47 +00:00
robertphillips@google.com
194bf824f0 Reverse sense of convex-quad-fix compiler flag
https://codereview.appspot.com/7206045/



git-svn-id: http://skia.googlecode.com/svn/trunk@7349 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-23 20:45:26 +00:00
edisonn@google.com
f91c63e116 Revert r7341
git-svn-id: http://skia.googlecode.com/svn/trunk@7347 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-23 20:12:31 +00:00
edisonn@google.com
c13ee606d8 If getAdvance fails, getAdvanceData should not assert, but ignored.
Review URL: https://codereview.appspot.com/7127056

git-svn-id: http://skia.googlecode.com/svn/trunk@7341 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-23 16:08:15 +00:00
bsalomon@google.com
6340a41108 Let them eat GrEffectRef.
Changes the remaining existing code that operates on naked GrEffects to GrEffectRef.
Review URL: https://codereview.appspot.com/7124058

git-svn-id: http://skia.googlecode.com/svn/trunk@7321 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-22 19:55:59 +00:00
jvanverth@google.com
46d3d39e65 Add GPU support for axis-aligned ovals:
- Add drawOval base function to SkDevice, and override in SkGpuDevice
- Move isSimilarityMatrix to SkMatrix (renamed to isSimilarity) and fixed up unit test
- Since both SkGpuDevice::drawOval() and GrContext::drawPath() can try to draw ovals, added GrContext::canDrawOval() and GrContext::internalDrawOval() to avoid duplicate code
- Hooked in axis-aligned oval fill shader
- Enabled GPU stroked circles
- Added stroked circle bench test

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



git-svn-id: http://skia.googlecode.com/svn/trunk@7304 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-22 13:34:01 +00:00
skia.committer@gmail.com
36df7ed46b Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7293 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-19 07:05:38 +00:00
reed@google.com
64d6295b0f increase iteration count from 16 to 24, when computing cubic-line intersection.
This fixes crbug 170666. Before the fix, were were finishing the "clip" step
with a curve that was still partly negative, and so as assert would fire.

added unittest to confirm that the assert doesn't fire.



git-svn-id: http://skia.googlecode.com/svn/trunk@7278 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-18 17:49:28 +00:00
bungeman@google.com
148a3961b1 Don't die when there are no fonts available.
https://codereview.appspot.com/7147044/


git-svn-id: http://skia.googlecode.com/svn/trunk@7265 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-17 20:19:13 +00:00
bsalomon@google.com
0ac6af4997 Wrap GrEffects in GrEffectPtr.
This is the first step towards automatic recycling of scratch resouces in the cache via ref-cnts.

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/7092061

git-svn-id: http://skia.googlecode.com/svn/trunk@7222 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-16 15:16:18 +00:00
skia.committer@gmail.com
ff21c2e0ae Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7215 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-16 07:05:56 +00:00
bsalomon@google.com
4e23068b37 Re-enable inst counting in debug builds.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/7098066

git-svn-id: http://skia.googlecode.com/svn/trunk@7206 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-15 20:37:04 +00:00
reed@google.com
848148ec10 Fix bug in cubic-clipper (SkEdgeClipper). When we chop the cubic on Top/Bottom
of the cliprect, we (correctly) clamp the Y coordinate of the control-point
right next to the on-curve point that was chopped (this ensures we don't go
slightly outside of the clip-rect due to imperfect T value calculation). However,
the code was also clamping the other control-point as well, resulting in warping
the cubic, which could sometimes force it outside of the clip.

The fix is to just remove the line of code that clampped the 2nd control-point.

unittest added to reproduce a test cubic that triggered an assert, due to the
cubic being outside of the cliprect. The test (w/o the fix) will assert in 
a SK_DEBUG build.
Review URL: https://codereview.appspot.com/7100056

git-svn-id: http://skia.googlecode.com/svn/trunk@7184 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-15 15:51:59 +00:00
scroggo@google.com
e490420efc Ensure that SkMemoryStream does not crash dereferencing fData.
SkMemoryStream attempts to dereference fData in multiple places.
Instead of allowing it to be NULL, resulting in a crash, set it
to SkData::NewEmpty().

Add a test for SkStream that will crash when its SkData is set to NULL.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@7111 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-09 22:02:58 +00:00
bsalomon@google.com
50c79d886b Enable warnings-as-errors on Windows.
Review URL: https://codereview.appspot.com/7066054

git-svn-id: http://skia.googlecode.com/svn/trunk@7094 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-08 20:31:53 +00:00
bsalomon@google.com
5f429b098f Fix signed/unsigned comparison in PictureTest.cpp
git-svn-id: http://skia.googlecode.com/svn/trunk@7092 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-08 18:42:20 +00:00
bsalomon@google.com
c3d753e345 Fix signed/unsigned comparison warning in PictureTest.cpp
git-svn-id: http://skia.googlecode.com/svn/trunk@7088 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-08 17:24:44 +00:00
reed@google.com
2b57dc6bb2 fix warings. add SkTAbs()
git-svn-id: http://skia.googlecode.com/svn/trunk@7075 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-08 13:23:32 +00:00
humper@google.com
0e51577a14 fix warning from scalar --> int32 conversion
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@7061 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-07 19:54:40 +00:00
humper@google.com
05af1afd42 eliminate all warnings in non-thirdparty code on mac
Most of these issues were due to functions whose definitions appear in header files; I changed those functions to be 'static inline' instead of just 'static' or 'inline', which kills the warning for such functions.

Other functions that were static or anonymous-namespaced but were unused in cpp files were probably called at some point but are no longer; someone who knows more than I do should probably scrub all the functions I either deleted or #if 0'ed out and make sure that the right thing is happening here.

Lots of unused variables removed, and one nasty const issue handled.

There remains a single warning in thirdparty/externals/cityhash/src/city.cc on line 146 related to a signed/unsigned mismatch.  I don't know if we have control over this library so I didn't fix this one, but perhaps someone could do something about that one.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@7051 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-07 16:47:43 +00:00
vandebo@chromium.org
d96d17b9c1 Remove SkRefPtr
(resubmit of https://codereview.appspot.com/7030059/)
TBR=junov@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@7030 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-04 19:31:24 +00:00
vandebo@chromium.org
6eb549e8ca Revert "Remove SkRefPtr" - r7021
samplecode/ still needs to be updated.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@7022 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-04 18:11:21 +00:00
vandebo@chromium.org
e8a76ae8ed Remove SkRefPtr
Review URL: https://codereview.appspot.com/7030059

git-svn-id: http://skia.googlecode.com/svn/trunk@7021 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-04 17:59:42 +00:00
reed@google.com
2fb96cc5d7 special-case matrix invert for translate and scale
update unittest to use diff scale-x and scale-y values, and tests for non-invertible scale matrices
Review URL: https://codereview.appspot.com/7027055

git-svn-id: http://skia.googlecode.com/svn/trunk@7019 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-04 17:02:33 +00:00
reed@google.com
ae57358447 use SkTreatAsSprite in SkDraw (with guard for chrome if needed)
git-svn-id: http://skia.googlecode.com/svn/trunk@6994 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-03 15:22:40 +00:00
skia.committer@gmail.com
422188f3c6 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6982 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-03 02:01:32 +00:00
reed@google.com
ad51430215 add unittest for SkTreatAsSprite
Review URL: https://codereview.appspot.com/7042044

git-svn-id: http://skia.googlecode.com/svn/trunk@6974 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-02 20:19:45 +00:00
reed@google.com
df194a47d2 remove #ifdef for scalar==float, since it always is
git-svn-id: http://skia.googlecode.com/svn/trunk@6964 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-02 15:49:25 +00:00
skia.committer@gmail.com
1a60dab449 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6936 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-24 02:01:25 +00:00
mike@reedtribe.org
bcbef579d0 add SkRRect::inset(), which mimics stroking
git-svn-id: http://skia.googlecode.com/svn/trunk@6935 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-23 23:11:21 +00:00
skia.committer@gmail.com
b89a03c890 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6930 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-22 02:02:33 +00:00
reed@google.com
5595af1b2e unify how we handle externally-provided storage in SkWriter32, with the goal
of simplifying the logic in reserve() so it can be inlined/accelerated.
Review URL: https://codereview.appspot.com/6962048

git-svn-id: http://skia.googlecode.com/svn/trunk@6923 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-21 15:36:33 +00:00
fmalita@google.com
6b18d2471f Limit the maximum number of dash segments per path
https://crbug.com/165432

In order to avoid trivial out-of-memory exploits, cap path dashing at 1000000 segments per path.

R=reed@google.com

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@6845 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-17 16:27:34 +00:00
robertphillips@google.com
441a005810 Fix r6808 fix & some compiler warnings
https://codereview.appspot.com/6948047/



git-svn-id: http://skia.googlecode.com/svn/trunk@6820 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-14 13:55:06 +00:00
skia.committer@gmail.com
61b05dcc7e Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6809 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-14 02:02:06 +00:00
junov@chromium.org
3cb834bd27 Modifying SkTileGrid to support arbitrary query rectangles.
Exposing SkTileGrid functionality in the public API through SkTileGridPicture.
This patch also makes TileGrid and Rtree testable in gm, which revealed errors.

TEST=gm with '--tileGrid'
BUG=http://code.google.com/p/chromium/issues/detail?id=164636
Review URL: https://codereview.appspot.com/6933044

git-svn-id: http://skia.googlecode.com/svn/trunk@6783 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-13 16:39:53 +00:00
junov@chromium.org
8f0ca06ef4 Fixing clip region test in deferred canvas, used to determine whether a draw operation occludes the entire canvas.
BUG=http://code.google.com/p/chromium/issues/detail?id=164580
TEST=unit test DeferredCanvas/TestDeferredCanvasFreshFrame
Review URL: https://codereview.appspot.com/6934045

git-svn-id: http://skia.googlecode.com/svn/trunk@6780 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-13 16:30:39 +00:00
skia.committer@gmail.com
306ab9d5de Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6774 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-13 02:01:33 +00:00
fmalita@google.com
bfa0401ab6 Use double precision when iterating in SkDashPathEffect::filterPath()
Extremely large path_length/dash_length ratios may cause us to loop
indefinitely otherwise.

R=reed@google.com

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@6773 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-12 22:13:58 +00:00
junov@chromium.org
8cdf0f52ff Adding quickContains API method to SkClipStack
BUG=http://code.google.com/p/chromium/issues/detail?id=164580
TEST=unit test ClipStack/quickContains
Review URL: https://codereview.appspot.com/6919044

git-svn-id: http://skia.googlecode.com/svn/trunk@6760 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-12 17:58:15 +00:00
epoger@google.com
31114c69f3 Create SkBitmapChecksummer and associated SkBitmapTransformer
As needed to start capturing gm image checksums.
Review URL: https://codereview.appspot.com/6920050

git-svn-id: http://skia.googlecode.com/svn/trunk@6759 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-12 17:22:23 +00:00
robertphillips@google.com
ca47aae7ec Minor cleanup
https://codereview.appspot.com/6927054/



git-svn-id: http://skia.googlecode.com/svn/trunk@6756 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-12 15:58:25 +00:00
skia.committer@gmail.com
c7b4be7f11 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6746 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-11 02:01:20 +00:00
junov@chromium.org
41e850f074 Fixing logic error in deferred canvas unittest.
Fixing an inverted test condition.  The tested feature is not broken, but the test was passing the inverted test because code just above was missing a restore call, which was affecting the test.
Review URL: https://codereview.appspot.com/6921044

git-svn-id: http://skia.googlecode.com/svn/trunk@6745 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-10 21:24:38 +00:00
vollick@chromium.org
57a54e33cf Add SkMatrix44 constructor that allows user to control the initialization
method.  Preliminary results using Chromium's cc_perftests
show that we can avoid almost half of the default constructors from
redundantly/unnecessarily initializing the matrix to identity.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@6742 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-10 20:16:10 +00:00
bsalomon@google.com
45a15f551b Modifications to GrPatherRenderer(Chain) interfaces to support clip mask manager.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6904069

git-svn-id: http://skia.googlecode.com/svn/trunk@6741 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-10 19:10:17 +00:00
bsalomon@google.com
7f805fff69 Disable failing test on android.
Review URL: https://codereview.appspot.com/6899059

git-svn-id: http://skia.googlecode.com/svn/trunk@6738 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-10 17:32:07 +00:00
scroggo@google.com
7c9d539d88 In SKP serialization, use existing encoded data.
If an SkBitmap has encoded data, write that during serialization
rather than reencoding it.

Add a test to ensure that this does not modify the output stream,
so the reader need not know the difference.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@6732 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-10 15:40:55 +00:00
junov@chromium.org
edf32d5b0e Fixing SkClipStack::clipDevPath so that it will not convert rectangular paths to rectangle clips if inverse fill.
BUG=http://code.google.com/p/chromium/issues/detail?id=164580
TEST=unit test ClipStackTest/test_rect_inverse_fill
Review URL: https://codereview.appspot.com/6880044

git-svn-id: http://skia.googlecode.com/svn/trunk@6731 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-10 14:57:54 +00:00
scroggo@google.com
a2a3192847 Fix some extract subset bugs.
In SkBitmap::extractSubset, perform a deepCopy, if the pixelRef supports it.

Fixes a bug in the 'extractbitmap' gm, which attempts to draw a subset of a texture backed bitmap (if the canvas is really an SkGpuCanvas).

Also fix some bugs that happen when there is a pixel offset. These fixes get bypassed by the deepCopy, but a user can still set a pixel offset manually.

When copying GPU backed bitmap with a pixel offset, copy the offset.

If the new config is the same as the old, copy fRowBytes as well.

Add a function to SkBitmap.cpp (getUpperLeftFromOffset) to find the x,y coordinate to use when copying to a new config.

Fix a bug where readPixels copied to the correct desired config and we were setting the generation ID to match even though the desired config was not the same as the original config (caught by my new tests!).

Add some tests to verify the correct behavior.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@6710 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-07 19:14:45 +00:00
epoger@google.com
b485832b66 Mark 64-bit constants as ULL to fix broken 32-bit Mac 10.6 build
TBR=bungeman
Review URL: https://codereview.appspot.com/6867079

git-svn-id: http://skia.googlecode.com/svn/trunk@6704 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-07 15:54:01 +00:00
epoger@google.com
0bba6bd78a Replace SkConsistentChecksum with SkCityHash (now including CityHash via DEPS)
Alternative to https://codereview.appspot.com/6847087/ ('Change SkConsistentChecksum to use SuperFastHash')
Review URL: https://codereview.appspot.com/6867060

git-svn-id: http://skia.googlecode.com/svn/trunk@6701 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-07 15:12:01 +00:00
skia.committer@gmail.com
d21444aab7 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6699 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-07 02:01:25 +00:00
junov@google.com
dbfac8a723 Defining new color constat for transparent color
Review URL: https://codereview.appspot.com/6901044

git-svn-id: http://skia.googlecode.com/svn/trunk@6696 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-06 21:47:40 +00:00
bsalomon@google.com
4c2443e36f Use ReduceClipStack in ClipMaskManager.
R=robertphillips@google.com

This will require some gpu rebaselining (complexclip_rect_aa, complexclip_aa, aaclip, simpleaaclip, complexclip_aa_layer)xy
Review URL: https://codereview.appspot.com/6884051

git-svn-id: http://skia.googlecode.com/svn/trunk@6694 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-06 20:58:57 +00:00
bsalomon@google.com
34cd70a581 Make the clip reducer operate on int rects. Remove redundant Gr from func
name.

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6890045

git-svn-id: http://skia.googlecode.com/svn/trunk@6688 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-06 14:23:20 +00:00
skia.committer@gmail.com
0264fb4543 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6687 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-06 02:01:25 +00:00
bsalomon@google.com
170bd792e1 Move GrReducedClip to its own files.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6891045

git-svn-id: http://skia.googlecode.com/svn/trunk@6686 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-05 22:26:11 +00:00
reed@google.com
99b5c7f94b optimize translate and scale
add map2() to optimize for mapping an array of 2D points into homogeneous 4-vector
Review URL: https://codereview.appspot.com/6874064

git-svn-id: http://skia.googlecode.com/svn/trunk@6685 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-05 22:13:59 +00:00
skia.committer@gmail.com
73b140a9f6 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6669 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-05 02:01:21 +00:00
bsalomon@google.com
a444430281 Make GrReduceClipStack use a caller provided query rect rather than return a
bounds.

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6865059

git-svn-id: http://skia.googlecode.com/svn/trunk@6665 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-04 15:22:12 +00:00
scroggo@google.com
4b90b1122c Handle recording a bitmap if copy fails.
If SkBitmapHeap::insert() returns INVALID_SLOT, assert at picture
record time so we can debug, but allow it to continue in release
mode, so that we can still capture a picture. At playback time,
print a message so we know that there was an error.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@6664 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-04 15:08:56 +00:00
bsalomon@google.com
ebce030108 Fix stale iterators in LList test. Add newline to end of SkTLList.h
git-svn-id: http://skia.googlecode.com/svn/trunk@6663 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-04 14:48:57 +00:00
bsalomon@google.com
8182fa0cac Make SkClipStack::Iter use SkClipStack::Element.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6871051

git-svn-id: http://skia.googlecode.com/svn/trunk@6661 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-04 14:06:06 +00:00
skia.committer@gmail.com
e659c2e820 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6660 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-04 02:01:25 +00:00
reed@google.com
7d68335eb4 add getTypes() to SkMatrix44, to cache how complex the matrix is.
add bench

optimize operator== by performing 4 compares in a row before checking
optimize setconcat by noting when we can write the answer directly into this

At least on this macbook, I had to mark helpers like isIdentity() as inline to get them inlined.
Review URL: https://codereview.appspot.com/6863053

git-svn-id: http://skia.googlecode.com/svn/trunk@6655 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 21:19:52 +00:00
bsalomon@google.com
dd3f7a9efe Reland r6649 with fix for build errors.
git-svn-id: http://skia.googlecode.com/svn/trunk@6653 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 19:47:41 +00:00
bsalomon@google.com
acc71aa5c2 Revert 6649 due to build breaks.
git-svn-id: http://skia.googlecode.com/svn/trunk@6651 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 19:18:57 +00:00
bsalomon@google.com
4928f86eda Insert in middle of SkTInternalLList and SkTLList, in place cons for
SkTLList.

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6870050

git-svn-id: http://skia.googlecode.com/svn/trunk@6649 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 19:05:44 +00:00
bsalomon@google.com
bbe52908a2 Add SkTLList, linked list class implemented on top of the internal llist class.
R=robertphillips@google.com
Committed: https://code.google.com/p/skia/source/detail?r=6644
Review URL: https://codereview.appspot.com/6869049

git-svn-id: http://skia.googlecode.com/svn/trunk@6647 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 18:01:45 +00:00
robertphillips@google.com
93f0332418 Fixed remaining clang compiler warnings
https://codereview.appspot.com/6865053/



git-svn-id: http://skia.googlecode.com/svn/trunk@6646 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 17:35:19 +00:00
bsalomon@google.com
08cb7286c6 Revert change accidentally committed.
git-svn-id: http://skia.googlecode.com/svn/trunk@6645 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 15:59:52 +00:00
bsalomon@google.com
d29902e0d7 Add SkTLList, linked list class implemented on top of the internal llist class.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6869049

git-svn-id: http://skia.googlecode.com/svn/trunk@6644 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 15:54:12 +00:00
bsalomon@google.com
42619d8df2 Rename SkTDLinkedList to SkTInternalLinked list, add some methods useful for forthcoming SkTLList.
Review URL: https://codereview.appspot.com/6858101

git-svn-id: http://skia.googlecode.com/svn/trunk@6643 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-03 14:54:59 +00:00
skia.committer@gmail.com
c3d7d90973 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6632 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-30 02:01:24 +00:00
bsalomon@google.com
5fac58c91d Remove SkClipStack::Iter::combinedNext.
Review URL: https://codereview.appspot.com/6844114

git-svn-id: http://skia.googlecode.com/svn/trunk@6619 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-29 21:14:59 +00:00
scroggo@google.com
9f686f3639 Create a factory to decode an SkBitmap from an SkData.
Add a test and a GM for the factory, and a PNG file for it to decode.
The PNG file is copyright-free, obtained from
http://openclipart.org/detail/29213/paper-plane-by-ddoo

In cmykjpeg, do not attempt to decode in the constructor, since it
currently crashes on Mac (if you provide the correct resource path).
Even when we fix this crash there is no need to do it in the
constructor, since we create all of the gms in order to
get their names (to determine whether to run them).

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

git-svn-id: http://skia.googlecode.com/svn/trunk@6618 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-29 21:05:37 +00:00
reed@google.com
fe7b1ed30a add SkPictureUtils::GatherPixelRefs()
Review URL: https://codereview.appspot.com/6845106

git-svn-id: http://skia.googlecode.com/svn/trunk@6615 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-29 21:00:39 +00:00
bsalomon@google.com
83a853aa65 Fix the gr/gl destruction order in Test.cpp
R=djsollen@google.com
Review URL: https://codereview.appspot.com/6851126

git-svn-id: http://skia.googlecode.com/svn/trunk@6602 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-29 17:27:37 +00:00
djsollen@google.com
f4d1b39118 Remove legacy flag for android from tests
Review URL: https://codereview.appspot.com/6782133

git-svn-id: http://skia.googlecode.com/svn/trunk@6600 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-29 16:29:58 +00:00
djsollen@google.com
0945bde599 Fix test app to ensure that we destroy our GPU resources.
The problem arises on devices like the Nexus 10 where we allow the
destruction of resources using the destructor of a static variable.
However, we have no guarentee that the GPU driver has not already
cleaned up it's resources prior to our static destructor.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@6599 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-29 15:28:45 +00:00
robertphillips@google.com
5985e7c4d1 SkRoundRect start
https://codereview.appspot.com/6815058/



git-svn-id: http://skia.googlecode.com/svn/trunk@6595 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-29 13:24:55 +00:00
bsalomon@google.com
edb26fdb83 Set empty/wide-open genID on clip stack in more places and fix a bug in GrReduceClipStack.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6847116

git-svn-id: http://skia.googlecode.com/svn/trunk@6579 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-28 14:42:41 +00:00
bsalomon@google.com
26daa8bbee Temporarily disable clip stack reduce test while working on fix.
git-svn-id: http://skia.googlecode.com/svn/trunk@6567 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-27 16:50:14 +00:00
bsalomon@google.com
705e840944 Make the clip stack reduction test generate inverse filled paths.
Also adds some comments to GrReduceClipStack.

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6847109

git-svn-id: http://skia.googlecode.com/svn/trunk@6561 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-27 15:43:57 +00:00
skia.committer@gmail.com
8ccf590b89 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6556 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-27 02:01:19 +00:00
bsalomon@google.com
e7b3d29a12 Actually fix GPU-less build.
git-svn-id: http://skia.googlecode.com/svn/trunk@6555 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-26 21:42:32 +00:00
bsalomon@google.com
a4e13c85b2 Fix GPU-less build.
Unreviewed.



git-svn-id: http://skia.googlecode.com/svn/trunk@6554 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-26 21:38:37 +00:00
bsalomon@google.com
51a6286c24 Add a function that computes a reduced representation of the clip stack.
Also adds a unit test. The function is not yet used other than in the test.
Review URL: https://codereview.appspot.com/6855098

git-svn-id: http://skia.googlecode.com/svn/trunk@6553 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-26 21:19:43 +00:00
reed@google.com
a8a3b3d9a0 check for bad enum use when adding contours
Review URL: https://codereview.appspot.com/6849103

git-svn-id: http://skia.googlecode.com/svn/trunk@6547 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-26 18:16:27 +00:00
skia.committer@gmail.com
1c9c0d3711 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6540 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-22 02:02:41 +00:00
tfarina@chromium.org
223137f49d Remove GrRandom API in favor of SkRandom.
TEST=tests
R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@6539 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-21 22:38:36 +00:00
epoger@google.com
f74dd16e9a Add self-test that reveals SkChecksum weakness
Review URL: https://codereview.appspot.com/6845064

git-svn-id: http://skia.googlecode.com/svn/trunk@6535 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-21 19:04:17 +00:00
sugoi@google.com
7775fd5779 Deferred canvas can now be flushed if an image is beyond a certain size to avoid a costly image copy.
BUG=http://code.google.com/p/chromium/issues/detail?id=137924
TEST=TestDeferredCanvasBitmapSizeThreshold unit test
Review URL: https://codereview.appspot.com/6852071

git-svn-id: http://skia.googlecode.com/svn/trunk@6527 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-21 15:47:04 +00:00
caryclark@google.com
f68154a3cf Add isRect variant that returns path closure and direction.
Add path test to verify that when isRect() returns false,
output parameters are unchanged.
Review URL: https://codereview.appspot.com/6855074

git-svn-id: http://skia.googlecode.com/svn/trunk@6524 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-21 15:18:06 +00:00
caryclark@google.com
bfe90370ea detect wrapped rect in path
Allow a rect to start in the middle of a span, and
wrap all the way around.

Initialize variable to suppress warning.

Add tests to detect rects constructed from a stroked
path.
Review URL: https://codereview.appspot.com/6847082

git-svn-id: http://skia.googlecode.com/svn/trunk@6522 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-21 13:56:20 +00:00
skia.committer@gmail.com
b0a327e939 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6521 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-21 02:02:25 +00:00
reed@google.com
603dbedf29 add specialty strokeRect() to SkStroke, which can return much cleaner results
Review URL: https://codereview.appspot.com/6843093

git-svn-id: http://skia.googlecode.com/svn/trunk@6510 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-20 19:00:28 +00:00
skia.committer@gmail.com
3458716b52 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6500 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-20 02:01:23 +00:00
vollick@chromium.org
f11cf9ff88 Add SkMatrix44::setColMajord, etc.
We have accessors for efficiently getting the matirx data, and it would be nice
if we had similar methods for setting the matrix entries.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@6494 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-19 21:02:06 +00:00
caryclark@google.com
56f233ab54 add two nested rect detector to path
Tease apart existing one rect path detector so
that a new variant can detect two nested rects as well.

Add tests to verify that both one and two rect
detectors both work and return the correct results.

Suppress other warnings in PathTest.
Review URL: https://codereview.appspot.com/6850059

git-svn-id: http://skia.googlecode.com/svn/trunk@6475 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-19 13:06:06 +00:00
scroggo@google.com
013c5d9107 In SkBitmapHeap, defer adding owners for new bitmaps.
When using an SkFlatDictionary to flatten shaders, the
dictionary can try to insert a duplicate bitmap shader
that uses a bitmap which has been removed from the
bitmap heap.

This change was originally suggested by junov in
https://codereview.appspot.com/6713048/.

Add a test to verify that deferring the owners works.
Without the change to bitmap heap the test would fail
(and crash in debug mode).

Also remove an unused function from SkFlatDictionary.

BUG=http://code.google.com/p/chromium/issues/detail?id=143923

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

git-svn-id: http://skia.googlecode.com/svn/trunk@6471 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-16 20:34:37 +00:00
mike@reedtribe.org
b947625800 remove unused (and undefined) SkColorSpace parameter.
git-svn-id: http://skia.googlecode.com/svn/trunk@6427 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-15 02:37:45 +00:00
vollick@chromium.org
9b21c25e74 Add SkMatrix44::setTranspose
It turned out that adding getDouble(...) and setDouble(...) made this change
easier, so I've included that in this cl as well.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@6424 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-14 21:33:55 +00:00
skia.committer@gmail.com
cec8de6821 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6413 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-14 02:01:22 +00:00
bsalomon@google.com
9bee33afbe Add a conservativelyContainsRect function to SkPath.
Review URL: https://codereview.appspot.com/6852044

git-svn-id: http://skia.googlecode.com/svn/trunk@6411 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-13 21:51:38 +00:00
skia.committer@gmail.com
fbb0ed959d Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@6409 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-13 21:46:06 +00:00
vollick@chromium.org
3959a76ab0 Changing the visibility of SkMatrix44::determinant().
Review URL: https://codereview.appspot.com/6819080

git-svn-id: http://skia.googlecode.com/svn/trunk@6395 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-13 15:08:22 +00:00
bsalomon@google.com
30c174b9ce Make SkPath cache the result of cheapComputeDirection.
Review URL: https://codereview.appspot.com/6810111

git-svn-id: http://skia.googlecode.com/svn/trunk@6394 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-13 14:36:42 +00:00
reed@google.com
20fb0c7f22 add tests for degenerate serifs to computeDirection
git-svn-id: http://skia.googlecode.com/svn/trunk@6391 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-13 13:47:39 +00:00