Commit Graph

699 Commits

Author SHA1 Message Date
robertphillips@google.com
37ebe3fbf6 Address some valgrind issues
https://codereview.appspot.com/7448051/



git-svn-id: http://skia.googlecode.com/svn/trunk@7966 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-04 20:03:44 +00:00
djsollen@google.com
46348e2173 Initialize bounds even if the text length is zero.
Review URL: https://codereview.chromium.org/12387092

git-svn-id: http://skia.googlecode.com/svn/trunk@7964 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-04 19:47:42 +00:00
robertphillips@google.com
b755a2ace7 Fix Mac 10.8 64-bit Release ClipCacheTest issue
unreviewed



git-svn-id: http://skia.googlecode.com/svn/trunk@7957 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-04 14:59:55 +00:00
jvanverth@google.com
c490f801b0 Change random number generator for 'tests' to SkMWCRandom. Also removes some
unused headers and fixes a couple of bugs exposed by changing the random 
number generator:

First, the function SkMatrix::getMaxStretch() had an error where it was testing
the square of a number against near-zero. This led to it occasionally taking a
cheaper but imprecise path for computing the eigenvalues of the matrix. It's 
been replaced with a check against the square of SK_ScalarNearlyZero. 

The second case was a failure in ClipStackTest, where it hit the rare case of 
a practically empty clip stack (it has a single Union) and we set a tight 
bounds. The bounds rect doesn't get set by GrReducedClip::ReduceClipStack() in 
this case, so when it clips the reduced stack it's clipping against garbage, 
and the resulting regions don't match. The solution is to initialize the 
tightBounds rect.


git-svn-id: http://skia.googlecode.com/svn/trunk@7952 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-04 13:56:38 +00:00
jvanverth@google.com
9b855c7c95 Resubmit r7899 and r7901.
git-svn-id: http://skia.googlecode.com/svn/trunk@7929 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-01 18:21:22 +00:00
skia.committer@gmail.com
631cdcb4a6 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7910 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-01 12:12:55 +00:00
robertphillips@google.com
af3a3b9fb1 Revert r7901 & r7899 to allow DEPS roll
git-svn-id: http://skia.googlecode.com/svn/trunk@7909 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-28 23:08:28 +00:00
robertphillips@google.com
6177e6999d Split GrGLContextInfo into GrGLContext & GrGLContextInfo
https://codereview.appspot.com/7436045/



git-svn-id: http://skia.googlecode.com/svn/trunk@7905 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-28 20:16:25 +00:00
jvanverth@google.com
b8b705b1b9 Add new vertex attribute array specification.
This changes the old method of setting vertex layout to a new one where we
specify vertex attribute data separately from attribute bindings (i.e. program
functionality). Attribute data is now set up via an array of generic attribute
types and offsets, and this is mapped to the old program functionality by
setting specific attribute indices. This allows us to create more general 
inputs to shaders.


git-svn-id: http://skia.googlecode.com/svn/trunk@7899 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-28 16:28:34 +00:00
edisonn@google.com
5bd26d32ab revert r7892
git-svn-id: http://skia.googlecode.com/svn/trunk@7896 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-28 14:01:44 +00:00
edisonn@google.com
194b7cdb50 resubmit after fixing assert issue: https://codereview.appspot.com/6744050
git-svn-id: http://skia.googlecode.com/svn/trunk@7892 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-27 19:45:11 +00:00
sugoi@google.com
54f0d1b711 Tests : Unused parameters cleanup
I removed unused parameters in the tests wherever it was trivial to do so. I'm trying to get the easy ones out of the way before we get into more involved discussions around this.
Review URL: https://codereview.appspot.com/7394055

git-svn-id: http://skia.googlecode.com/svn/trunk@7891 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-27 19:17:41 +00:00
junov@chromium.org
29b19e53cf Change SkTileGride geometry calculations to match the Chromium compositor.
This patch changes the semantics of tileWidth/Height to include the border region, and
uses an offset to take into account the fact that there is no outer border for outer
tiles. This patch also fixes a previous bug where the right column and bottom row were
considered to be included in bounds that are expressed as an SkIRect.

Companion Chromium CL required for roll: https://codereview.chromium.org/12221077/

TEST=TileGrid unit test
Review URL: https://codereview.appspot.com/7350050

git-svn-id: http://skia.googlecode.com/svn/trunk@7885 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-27 18:35:16 +00:00
edisonn@google.com
d1c53aae59 Revert r7883
git-svn-id: http://skia.googlecode.com/svn/trunk@7884 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-27 17:46:09 +00:00
edisonn@google.com
676aef05ab Use SkSet to fix issue when pdf generates an exp number of resources.
The problem fixed - http://code.google.com/p/skia/issues/detail?id=940 - is that getResources will recursively obtain all child resource recursively without checking for duplicates.

If we have lots of duplicates, then we try to build a very large vector (exponential with the number of nodes usually) and sooner or later we end up using too much memory and crash.

A possible solution could have been to make sure resources do not have duplicates, but that requirement is impractical, and it this leaves the solution fragile, if there is any issue in the tree,  we crash.

When we emit the pdf, the large number of duplicates is not an issue, because SkPDFCatalog::addObject will deal with duplicates.

I have run the gm with --config pdf, and the images are 100% same bits, while the pdfs have the same size but some very small changes, the order of some objects.
Review URL: https://codereview.appspot.com/6744050

git-svn-id: http://skia.googlecode.com/svn/trunk@7883 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-27 16:54:44 +00:00
skia.committer@gmail.com
5ca3bd0cbb Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7857 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-26 07:01:22 +00:00
reed@google.com
789c6f291e add --tmpDir foo option to tests, to allow unittests that want to write/read files
use tmpDir in SkStream tests



git-svn-id: http://skia.googlecode.com/svn/trunk@7851 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-25 20:24:24 +00:00
edisonn@google.com
04115a102c Add an SkSet class to be used by Pdf only, for now - reverted because of triggering heap corruption on Win7, original coe review: https://codereview.appspot.com/6749054
git-svn-id: http://skia.googlecode.com/svn/trunk@7849 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-25 20:07:24 +00:00
bungeman@google.com
9447103029 Always round text position correctly.
https://codereview.appspot.com/7383049/

Will require rebaseline of fontscaler GM.

Must add SK_IGNORE_SUBPIXEL_AXIS_ALIGN_FIX to Chromium
until ~150 layout tests can be rebaselined.



git-svn-id: http://skia.googlecode.com/svn/trunk@7842 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-25 15:55:13 +00:00
scroggo@google.com
f8d7d27313 Create SkLazyPixelRef which performs lazy decoding.
The new pixel ref behaves similarly to SkImageRef, with some key differences:
It does not depend on the images project.
It requires an SkImageCache, which handles allocation and caching of the pixel
memory.
It takes a function signature for decoding which decodes into already allocated
pixel memory rather than into an SkBitmap.

Add two implementations of SkImageCache: SkLruImageCache and SkAshmemImageCache.

Replace SkSerializationHelpers::DecodeBitmap with SkPicture::InstallPixelRefProc,
and update sites that referenced it.

SkBitmapFactory now sets the pixel ref to a new object of the new
class SkLazyPixelRef, provided it has an SkImageCache for caching.

Provide an option to do lazy decodes in render_pictures and bench_pictures.

SkPicture:
Eliminate the default parameters in the constructor.
If a proc for decoding bitmaps is installed, use it to decode any encoded
data in subpictures.
When parsing deserializing subpictures, check for success.
When serializing subpictures, pass the picture's bitmap encoder to the
subpicture's call to serialize.

Update BitmapFactoryTest to test its new behavior.

BUG=https://code.google.com/p/skia/issues/detail?id=1008
BUG=https://code.google.com/p/skia/issues/detail?id=1009

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

git-svn-id: http://skia.googlecode.com/svn/trunk@7835 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-22 21:38:35 +00:00
reed@google.com
dff53c26e7 remove obsolete build flag SK_IGNORE_CONVEX_QUAD_OPT
Review URL: https://codereview.appspot.com/7363046

git-svn-id: http://skia.googlecode.com/svn/trunk@7820 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-22 14:19:58 +00:00
senorblanco@chromium.org
3c8fb51718 Fix warnings-as-errors on Mac10.6 and Win. Unreviewed.
git-svn-id: http://skia.googlecode.com/svn/trunk@7811 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-02-21 17:10:44 +00:00
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