Commit Graph

651 Commits

Author SHA1 Message Date
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