Commit Graph

777 Commits

Author SHA1 Message Date
skia.committer@gmail.com
45fb8b6013 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8714 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-17 07:00:56 +00:00
junov@chromium.org
acea3ef448 Cleanup: Removing unnecessary args/complexity in SkSurface_Base and friends
Review URL: https://codereview.chromium.org/14263017

git-svn-id: http://skia.googlecode.com/svn/trunk@8708 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-16 19:41:09 +00:00
skia.committer@gmail.com
7841c63136 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8693 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-16 07:01:17 +00:00
tfarina@chromium.org
06910786a1 Use ILLEGAL_MODE macro to silence clang error.
This fixes the following clang error:

../../tests/XfermodeTest.cpp:43:44: error: comparison of constant -1 with expression of type 'SkXfermode::Mode' is always false [-Werror,-Wtautological-constant-out-of-range-compare]
    REPORTER_ASSERT(reporter, reportedMode == -1);
                                  ~~~~~~~~~~~~ ^  ~~

R=vandebo@chromium.org,reed@google.com

Review URL: https://codereview.chromium.org/14180004

git-svn-id: http://skia.googlecode.com/svn/trunk@8692 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-15 22:12:43 +00:00
caryclark@google.com
ad65a3e5fb path ops work in progress
standardize tests
use SK_ARRAY_COUNT everywhere
debug why x87 differs from SIMD 64
various platform specific fixes

git-svn-id: http://skia.googlecode.com/svn/trunk@8689 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-15 19:13:59 +00:00
junov@chromium.org
9becf0090f Fix crash with SkDeferredCanvas+SkSurface integration with in order draw buffer.
The fImmediateDevice member of DeferredDevice (SkDeferredCanvas.cpp) was becoming invalid after a fork of the backingstore in SkSurface_Gpu cause the device to be substituted.

New unit test code was to exercise SkSurface copy on write with draws that are deferred in GrInOrderDrawBuffer.  The bad pointer was causing the test to crash.

TEST=skia unit test DeferredCanvas, subtest TestDeferredCanvasSurface
Review URL: https://codereview.chromium.org/14263015

git-svn-id: http://skia.googlecode.com/svn/trunk@8686 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-15 18:15:23 +00:00
skia.committer@gmail.com
4bb50b22fc Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8670 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-13 07:01:15 +00:00
junov@chromium.org
5ee449af74 Fixing viral copy/paste typo Shapshot -> Snapshot
Unreviewed

git-svn-id: http://skia.googlecode.com/svn/trunk@8667 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-12 20:20:50 +00:00
junov@chromium.org
3c5ec8df2c Adding 'static' to eleminate compile warning on mac
Unreviewed.

git-svn-id: http://skia.googlecode.com/svn/trunk@8649 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-12 13:34:47 +00:00
junov@chromium.org
67d7422844 Adding SkSurface support to SkDeferredCanvas
Review URL: https://codereview.chromium.org/14178002

git-svn-id: http://skia.googlecode.com/svn/trunk@8648 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-12 13:33:01 +00:00
caryclark@google.com
7abfa49390 turn on pathops unit test
This temporarily disables SK_ENABLE_INST_COUNT 
( skbug.com/1219 )

This fixes a linktime error on VS2012 in
PathTest.cpp; -SK_ScalarInfinity should be
SK_ScalarNegativeInfinity instead.

This adds pathops and pathops unit tests to the
main unit tests.

Should this change destabilize anything, it should
be sufficient to comment out the pathops gypi
includes. at test.gyp:18,21.
Review URL: https://codereview.chromium.org/14137010

git-svn-id: http://skia.googlecode.com/svn/trunk@8644 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-12 11:59:41 +00:00
epoger@google.com
908f583662 rename SkBitmapChecksummer as SkBitmapHasher, and prepare for it to possibly use
some algorithm other than CityHash
Review URL: https://codereview.chromium.org/14170010

git-svn-id: http://skia.googlecode.com/svn/trunk@8639 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-12 02:23:55 +00:00
scroggo@google.com
5a6324e314 Better fix for the patched build.
skia_test is also built on Android in pathops_unittest, which needed
to also depend on the flags project.

Remove the hack in skia_test of providing the full path.

Review URL: https://codereview.chromium.org/14177002

git-svn-id: http://skia.googlecode.com/svn/trunk@8632 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-11 20:11:40 +00:00
reed@google.com
66c9f9995e short names should be ... short, in commandlineflags
git-svn-id: http://skia.googlecode.com/svn/trunk@8629 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-11 19:04:34 +00:00
reed@google.com
83165a5f71 add fontmgr tests, and optional --verboseFontMgr flag (or -vfm) for more output
git-svn-id: http://skia.googlecode.com/svn/trunk@8626 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-11 18:31:25 +00:00
reed@google.com
9aff14831b restore option to --match (instead of --matchStr)
git-svn-id: http://skia.googlecode.com/svn/trunk@8624 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-11 18:27:52 +00:00
scroggo@google.com
746cd0fc9a Fix build. Unreviewed.
I don't understand why this change is necessary. On Android,
SkCommandLineFlags.h is not found, but only in this project.
Other projects depend on flags and include the file without
using the full path. Likewise, this works on other platforms.
Removing for now until I figure out the correct fix.

Review URL: https://codereview.chromium.org/13910008

git-svn-id: http://skia.googlecode.com/svn/trunk@8621 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-11 17:27:58 +00:00
commit-bot@chromium.org
ba59d64b05 use commandlineflags for tests/
Author: reed@google.com

Reviewed By: scroggo@google.com

Review URL: https://chromiumcodereview.appspot.com/14047009

git-svn-id: http://skia.googlecode.com/svn/trunk@8616 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-11 16:54:09 +00:00
caryclark@google.com
db60de7cbe shape ops test fixes
- fix rand for Android
- build unit test on linux
- use atomic inc in test count
- add casting for Android

git-svn-id: http://skia.googlecode.com/svn/trunk@8610 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-11 12:33:23 +00:00
skia.committer@gmail.com
391ca66276 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8608 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-11 07:01:45 +00:00
caryclark@google.com
e942bc329a fix a few pathops test bugs exposed on Mac and Linux
git-svn-id: http://skia.googlecode.com/svn/trunk@8601 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-10 18:53:01 +00:00
reed@google.com
7a90daf258 fix bug introduced with SK_IGNORE_CUBIC_STROKE_FIX where we no longer respected
subDivide limit. This caused problems with degenate paths (too much recursion).

The fix was two parts:
1. decrement the subDivide limit as we recurse
2. up the limit for cubics to 7, to match our current quality

added unittest that replicated the too-much-recursion bug.
Review URL: https://codereview.chromium.org/14086002

git-svn-id: http://skia.googlecode.com/svn/trunk@8599 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-10 18:44:00 +00:00
caryclark@google.com
d54e1e9751 add extended option to Test
The command line option
--extended runs extended tests
--verbose reports number of tests run (if recorded)

Added simple help as well.
Review URL: https://codereview.chromium.org/14063005

git-svn-id: http://skia.googlecode.com/svn/trunk@8595 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-10 15:57:31 +00:00
caryclark@google.com
66089e4ec4 Make parallel unit testing work on windows
Review URL: https://codereview.chromium.org/14072002

git-svn-id: http://skia.googlecode.com/svn/trunk@8594 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-10 15:55:37 +00:00
junov@chromium.org
ef5b811426 Fixing SkTileGrid to clamp rather than clip content and querries that are outside the bounds of the grid
This fix prevents border padding and offsets on the tile grid structure from resulting in bad clipping. The job of clipping contents is left to the playback canvas.

BUG=https://code.google.com/p/skia/issues/detail?id=1209
TEST=TileGrid unit test, 
Review URL: https://codereview.chromium.org/13493016

git-svn-id: http://skia.googlecode.com/svn/trunk@8576 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-09 16:13:09 +00:00
bsalomon@google.com
686bcb871b Reland of 8525 with fix for case when GrRT outlives GrTexture.
Review URL: https://codereview.chromium.org/13814015

git-svn-id: http://skia.googlecode.com/svn/trunk@8573 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-09 15:04:12 +00:00
skia.committer@gmail.com
3284017a60 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8568 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-09 07:01:27 +00:00
humper@google.com
8e029e6e59 silence android warning
git-svn-id: http://skia.googlecode.com/svn/trunk@8567 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-08 21:54:58 +00:00
humper@google.com
75e3ca127c Error checking / reporting API
Review URL: https://codereview.chromium.org/13699004

git-svn-id: http://skia.googlecode.com/svn/trunk@8566 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-08 21:44:11 +00:00
caryclark@google.com
496120185c saving the old before blowing away
git-svn-id: http://skia.googlecode.com/svn/trunk@8565 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-08 20:37:35 +00:00
caryclark@google.com
818b0cc1b8 Add implementation of path ops
This CL depends on
https://codereview.chromium.org/12880016/
"Add intersections for path ops"

Given a path, iterate through its contour, and
construct an array of segments containing its curves.

Intersect each curve with every other curve, and for
cubics, with itself.

Given the set of intersections, find one with the 
smallest y and sort the curves eminating from the
intersection. Assign each curve a winding value.

Operate on the curves, keeping and discarding them
according to the current operation and the sum of
the winding values.

Assemble the kept curves into an output path.
Review URL: https://codereview.chromium.org/13094010

git-svn-id: http://skia.googlecode.com/svn/trunk@8553 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-08 11:50:46 +00:00
caryclark@google.com
9166dcb3a0 Add intersections for path ops
This CL depends on 
https://codereview.chromium.org/12827020/
"Add base types for path ops"

The intersection of a line, quadratic, or cubic
with another curve (or with itself) is found by
solving the implicit equation for the curve pair.

The curves are first reduced to find the simplest
form that will describe the original, and to detect
degenerate or special-case data like horizontal and
vertical lines.

For cubic self-intersection, and for a pair of cubics,
the intersection is found by recursively
approximating the cubic with a series of quadratics.

The implicit solutions depend on the root finding
contained in the DCubic and DQuad structs, and
the quartic root finder included here.
Review URL: https://codereview.chromium.org/12880016

git-svn-id: http://skia.googlecode.com/svn/trunk@8552 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-08 11:50:00 +00:00
caryclark@google.com
07393cab57 Add base types for path ops
Paths contain lines, quads, and cubics, which are
collectively curves.

To work with path intersections, intermediary curves
are constructed. For now, those intermediates use
doubles to guarantee sufficient precision.

The DVector, DPoint, DLine, DQuad, and DCubic
structs encapsulate these intermediate curves.

The DRect and DTriangle structs are created to
describe intersectable areas of interest.

The Bounds struct inherits from SkRect to create
a SkScalar-based rectangle that intersects shared
edges.

This also includes common math equalities and
debugging that the remainder of path ops builds on,
as well as a temporary top-level interface in
include/pathops/SkPathOps.h.
Review URL: https://codereview.chromium.org/12827020

git-svn-id: http://skia.googlecode.com/svn/trunk@8551 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-08 11:47:37 +00:00
bsalomon@google.com
e06f8ef5ba Revert 8525,8526 pending investigation of bench_pictures crashes.
git-svn-id: http://skia.googlecode.com/svn/trunk@8527 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-03 21:06:42 +00:00
bsalomon@google.com
d02e8803e9 Remove GrTexture::releaseRenderTarget() and add GrSurface::isSameAs().
Review URL: https://codereview.chromium.org/13414006

git-svn-id: http://skia.googlecode.com/svn/trunk@8525 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-03 19:49:13 +00:00
junov@chromium.org
8bc9edce9e Build fix for Surface Test on non-gpu builds
git-svn-id: http://skia.googlecode.com/svn/trunk@8513 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-03 15:25:46 +00:00
junov@chromium.org
af0583528c Fixed bug with SkImage leaving canvas backing store in an immutable state after destroy.
Added unit test that verifies that surface backing is writable after creating and destroying an image.
Review URL: https://codereview.chromium.org/13226002

git-svn-id: http://skia.googlecode.com/svn/trunk@8512 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-03 15:03:26 +00:00
edisonn@google.com
6addb19300 resubmit https://code.google.com/p/skia/source/detail?r=7883 (in the meantime we
added capability to collect minidump and callstack if buildbot fails with heap
coruption in windows, and a NPE bug was fixed in SkPDFDocument, when document was destroyed without ever beeing used and a field was NULL + a few minor conflicts have been resolved)

git-svn-id: http://skia.googlecode.com/svn/trunk@8487 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-02 15:33:08 +00:00
bungeman@google.com
07a69f848c Name table iterator.
https://codereview.appspot.com/8180043/


git-svn-id: http://skia.googlecode.com/svn/trunk@8480 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-02 14:12:38 +00:00
skia.committer@gmail.com
05a2ee052c Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8477 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-02 07:01:34 +00:00
jvanverth@google.com
054ae99d93 Take two for r8466:
Replace the old attribute binding and index interface with one where we include the binding as part of the attribute array. Also removed the fixed attribute indices for constant color and coverage attributes, and replaced with dynamic ones based on current attribute set. Removed binding of color and coverage attributes unless they're actually set.

Original author: bsalomon@google.com

Author: jvanverth@google.com

Reviewed By: bsalomon@google.com,robertphillips@google.com

Review URL: https://chromiumcodereview.appspot.com/13296005


git-svn-id: http://skia.googlecode.com/svn/trunk@8468 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-01 20:06:51 +00:00
jvanverth@google.com
c7bf2963f0 Rolling back r8466.
Not reviewed.


git-svn-id: http://skia.googlecode.com/svn/trunk@8467 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-01 19:29:32 +00:00
commit-bot@chromium.org
fb495b537f Revise attribute binding interface.
Replace the old attribute binding and index interface with one where we include the binding as part of the attribute array. Also removed the fixed attribute indices for constant color and coverage attributes, and replaced with dynamic ones based on current attribute set. Removed binding of color and coverage attributes unless they're actually set.

Original author: bsalomon@google.com

Author: jvanverth@google.com

Reviewed By: bsalomon@google.com,robertphillips@google.com

Review URL: https://chromiumcodereview.appspot.com/13296005

git-svn-id: http://skia.googlecode.com/svn/trunk@8466 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-04-01 19:12:42 +00:00
bsalomon@google.com
b79d865f03 Fix GLPrograms test.
Review URL: https://codereview.chromium.org/13327008

git-svn-id: http://skia.googlecode.com/svn/trunk@8450 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-29 20:30:50 +00:00
junov@chromium.org
995beb6b00 Adding unit test for verifying copy on write in SkSurface + bug fix in SkCanvas::clear
Review URL: https://codereview.chromium.org/13116018

git-svn-id: http://skia.googlecode.com/svn/trunk@8429 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-28 13:49:22 +00:00
bsalomon@google.com
31ec7985f2 Move GrGLProgram::Desc out of GrGLProgram.
Review URL: https://codereview.chromium.org/12942014

git-svn-id: http://skia.googlecode.com/svn/trunk@8411 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-27 18:14:57 +00:00
skia.committer@gmail.com
37cbc7fd01 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8404 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-27 07:01:04 +00:00
bsalomon@google.com
26ec00ea1b Fix unit test build break
git-svn-id: http://skia.googlecode.com/svn/trunk@8394 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-26 16:49:37 +00:00
bsalomon@google.com
4647f90598 Replace edge types with GrEdgeEffect.
This strips out last of the edge types and the fixed function edge attribute and replaces them with using GrEdgeEffect. Also fixes a minor bug when checking attribute counts -- it was using kAttribIndexCount instead of kVertexAttribCnt. 

Original Author: jvanverth@google.com
Review URL: https://codereview.chromium.org/13069003

git-svn-id: http://skia.googlecode.com/svn/trunk@8392 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-26 14:45:27 +00:00
bsalomon@google.com
c26d94fd7d Move nested class GrDrawTarget::Caps out as GrDrawTargetCaps.
Pass caps to GrEffect::TestCreate() functions so that they can return effects that will work with the capabilities.
Review URL: https://codereview.chromium.org/12965018

git-svn-id: http://skia.googlecode.com/svn/trunk@8369 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-25 18:19:00 +00:00