Commit Graph

9409 Commits

Author SHA1 Message Date
edisonn@google.com
d03c2c732e pdfviewer: more code comments + concat the pdf matrix with the existing matrix in canvas, instead of reseting it.
Review URL: https://codereview.chromium.org/27057003

git-svn-id: http://skia.googlecode.com/svn/trunk@11735 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-11 18:26:45 +00:00
halcanary@google.com
29d4e63864 GIF decode: optional error messages and fault tolerance.
Add new runtime configuration variable,
images.gif.suppressDecoderWarnings, which suppresses warning and
errors from the GIF library.  It defaults to "true", which is current
behavior.

(This setting can be changed by setting the environment variable
skia_images_gif_suppressDecoderWarnings="false".)

Some conditions which were errors before are now warnings:

-   If the image width or height is greater than the GIF screen width or
    height (respectively) we expand the screen to hold the image.

-   If the offset of the image inside the screen would place the
    image outside of the screen, we shift the image to fix this.

-   If the image lacks a color table, we create a default color table.

-   If the image is truncated, then the rest of the image is filled with
    the fill color.

In all four cases, if images.gif.suppressDecoderWarnings is set to
false, then a warning message is printed via SkDebugf.

In the event of another kind of error, SkGIFImageDecoder::onDecode()
will still return false.  But with this change, if
images.gif.suppressDecoderWarnings is set to false, a description of
the error is printed via SkDebugf.

Also, added a new unit test GifTest, which tests the deconing of both
good GIf files and corrupted files that should now work with this
change.  This unit test is disabled on Win32, iOS, and Mac.

BUG=skia:1689
R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11734 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-11 18:21:56 +00:00
senorblanco@chromium.org
5e85300729 SkRectShaderImageFilter: add a workaround for the zero-sized rects currently passed by Blink.
BUG=306488
R=robertphillips@google.com, robertphillips

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11733 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-11 17:57:47 +00:00
senorblanco@chromium.org
e9d61ed8c4 Use #if insteadof #ifdef DYNAMIC_ANNOTATIONS_ENABLED. It's always defined, just to 0 or 1.
BUG=
R=mtklein

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11731 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-11 16:45:50 +00:00
edisonn@google.com
2af2ad9cc0 pdfviewer: (more code cleanup): class documentation and comments
Review URL: https://codereview.chromium.org/27043002

git-svn-id: http://skia.googlecode.com/svn/trunk@11730 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-11 16:17:44 +00:00
commit-bot@chromium.org
f8a6b20e76 save/restore the canvas around every bench draw call
BUG=
R=djsollen@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11728 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-11 15:20:29 +00:00
scroggo@google.com
b4227d20b9 Remove the old skimage expectations.
As of https://code.google.com/p/skia/source/detail?r=11712 ,
the bots are now reading the expectations from a new place,
so these are no longer needed.

Unreviewed.

BUG=skia:1466

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11727 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-11 15:12:46 +00:00
scroggo@google.com
429c962179 Format-only changes to skimage expectations files.
When running rebaseline.py, the format of the file changes from
what is currently checked in, but the actual data remains the
same. Update the format so future changes will be easier to see
visually (not mixed in with format changes).

Unreviewed.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11726 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-11 14:51:31 +00:00
robertphillips@google.com
6d837aa1a1 Fix leak in BlurTest
https://codereview.chromium.org/26941002/



git-svn-id: http://skia.googlecode.com/svn/trunk@11725 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-11 14:38:46 +00:00
robertphillips@google.com
1f1b4aa06a Fix double ref issue in SkPDFFont ctor
https://codereview.chromium.org/26799003/



git-svn-id: http://skia.googlecode.com/svn/trunk@11724 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-11 14:27:16 +00:00
skia.committer@gmail.com
d33115d59b Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@11723 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-11 07:01:39 +00:00
robertphillips@google.com
9a282bee52 Fix uninitialized memory read in BitmapCopy test with A1 config
https://codereview.chromium.org/26890002/



git-svn-id: http://skia.googlecode.com/svn/trunk@11722 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 22:01:02 +00:00
commit-bot@chromium.org
21a705d2eb SK_ONCE for SkMatrix::I()
Going to start doing these in progressively larger and larger bulk,
but I figured the first few changes probably merit caution.

BUG=
R=reed@google.com, bungeman@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11721 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 21:58:31 +00:00
senorblanco@chromium.org
e258eb34a8 Implement crop rect support for SkRectShaderImageFilter: remove fRect and use the cropRect from SkImageFilter in its place.
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11720 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 21:36:48 +00:00
mtklein@google.com
c95e1e5d8f Temporarily disable FilterBitmapBenches while I fix it.
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11718 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 21:27:17 +00:00
scroggo@google.com
d23e683c51 Add ability to rebaseline skimage to rebaseline.py
Skip pattern matching for skimage, since the skimage results do not
match the pattern.

Automatically fill in expectations_root and actuals_base_url when
--skimage is specified.

Requires a change to move the expectations files to the right place.
Depends on https://codereview.chromium.org/26734006

(SkipBuildBotRuns)

BUG=skia:1466
R=epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11717 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 21:09:24 +00:00
edisonn@google.com
e50d9a1fcd mode code cleanup (100c / l, comments)
Review URL: https://codereview.chromium.org/26912005

git-svn-id: http://skia.googlecode.com/svn/trunk@11716 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 20:58:22 +00:00
scroggo@google.com
d048a3c359 Fix a minor regex bug.
Match against '.', rather than any character (how '.' is treated
in a regular expression).

Previous to this, xfermodes_8888*png matched the expression.

R=epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11714 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 20:41:43 +00:00
commit-bot@chromium.org
d494b09f55 Align SkLumaColorFilter with the spec.
The spec requires the resulting RGB channels for LuminanceToAlpha to be
0 (and not just scaled by the luminance value</facepalm>):

  | R' |     |      0        0        0  0  0 |   | R |
  | G' |     |      0        0        0  0  0 |   | G |
  | B' |  =  |      0        0        0  0  0 | * | B |
  | A' |     | 0.2125   0.7154   0.0721  0  0 |   | A |
  | 1  |     |      0        0        0  0  1 |   | 1 |

(http://www.w3.org/TR/2011/REC-SVG11-20110816/filters.html#feColorMatrixElement)

This doesn't affect luminance masking (which depends only on the
resulting alpha channel), but other color filter users may care
about all color components.

R=bsalomon@google.com, reed@google.com, robertphillips@google.com

Author: fmalita@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11713 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 20:13:51 +00:00
commit-bot@chromium.org
a7538baeae SkThreadPool: tweak two little things that have been annoying me
1) it's pretty annoying that SkThreadPool doesn't include SkRunnable for us;
 2) add wait() so we don't have to keep using SkAutoTDelete/free() to wait for completion.

BUG=
R=scroggo@google.com, reed@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11711 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 18:49:04 +00:00
djsollen@google.com
dcfed6cecf fix warnings when running a no gpu build
R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11710 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 18:48:27 +00:00
djsollen@google.com
4e1d4b3d23 fix mac10.6 build
Review URL: https://codereview.chromium.org/26882003

git-svn-id: http://skia.googlecode.com/svn/trunk@11708 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 17:50:52 +00:00
djsollen@google.com
a05bbfeaa6 rebaseline nexus7 perf improvement
Review URL: https://codereview.chromium.org/26884002

git-svn-id: http://skia.googlecode.com/svn/trunk@11707 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 17:42:20 +00:00
djsollen@google.com
97f0beefe5 fix android_gdb_exe script
R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11706 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 17:41:32 +00:00
reed@google.com
fb6deed66c make explicit the requirement that all colorfilters are reentrant-safe
BUG=
R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11705 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 17:35:58 +00:00
djsollen@google.com
70de4da331 Insert swapbuffers into GPU benchmarks.
R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11704 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 17:33:39 +00:00
epoger@google.com
1ddfbc201a gm: if test has no expectations, record its result as no-expectations regardless of ignoreFailure
After https://code.google.com/p/skia/source/detail?r=11640 ('Ignore any
pdf-poppler GM failures'), there are a bunch of pdf-poppler tests showing up
as failure-ignored at http://c128.i.corp.google.com/production-gm-diffs/latest/view.html

Make them go away.

R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11703 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 17:24:20 +00:00
bungeman@google.com
0fbe01fa53 Add -fPIC fro tsan (isn't alrady set in non-library).
git-svn-id: http://skia.googlecode.com/svn/trunk@11702 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 17:24:17 +00:00
bungeman@google.com
27d4ffe352 Enable -fPIE, and -pie in tsan build. We're already -fPIC.
R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11701 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 17:09:49 +00:00
robertphillips@google.com
1b440d1574 Add leak to valgrind.supp
https://codereview.chromium.org/26869002/



git-svn-id: http://skia.googlecode.com/svn/trunk@11700 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 17:04:14 +00:00
djsollen@google.com
ae748e7bd0 Rebaseline Nexus 7 GM results after upgrading devices to 4.3
The fonts have changed as a result of the upgrade so all GMs with
text are reporting as mismatches.

R=robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11699 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 16:15:45 +00:00
scroggo@google.com
19d15cebd0 New expectations files for skimage.
Copies them from expectations/skimage/buildername.json to
expectations/skimage/buildername/expected-results.json.

Required for https://codereview.chromium.org/26734006/ and
ultimately BUG=skia:1466

A follow up change will delete the old expectations files once
https://codereview.chromium.org/26734006/ has landed.

(SkipBuildbotRuns) - Since the new expectations files aren't even
read yet (they won't be until https://codereview.chromium.org/26734006/
is checked in), this need not be tested by the buildbots (yet).

Unreviewed.

BUG=skia:1466

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11698 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 16:04:16 +00:00
robertphillips@google.com
0197b32bfb Always clear dest in SkBitmap::copyTo's draw path
https://codereview.chromium.org/26268003/



git-svn-id: http://skia.googlecode.com/svn/trunk@11697 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 15:48:16 +00:00
commit-bot@chromium.org
96b128b760 rebaseline bench expectations
R=borenet@google.com, bsalomon@google.com

Author: djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11696 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 15:23:00 +00:00
reed@google.com
0a6151d66c Revert "Revert "change SkColorTable to be immutable""
This reverts commit b8162cb840f4cb6002ef68d5ac775c6a122c52a9.

Fixed was call-sites in benches that used the (now gone) setIsOpaque api.

R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11695 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 14:44:56 +00:00
bsalomon@google.com
b006fe7e2f Rebase SGX images after GrGLSLExpr change
Review URL: https://codereview.chromium.org/26223005

git-svn-id: http://skia.googlecode.com/svn/trunk@11694 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 14:42:45 +00:00
bungeman@google.com
cc5fd0a95a Use the modified path, not the original path for the platform prefix.
Fixes regression introduced in r11642.


git-svn-id: http://skia.googlecode.com/svn/trunk@11693 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 14:16:23 +00:00
senorblanco@chromium.org
b295fb6ff3 Change SkImageFilter's cropRect from SkIRect to a CropRect struct, containing an SkRect and flags indicating which parameters are set.
NOTE: this will require SK_CROP_RECT_IS_INT=1 to be set in Chrome until Blink has been updated to use SkImageFilter::CropRect. Include https://codereview.chromium.org/26528002/ with the Skia roll.

Note also that SK_CROP_RECT_IS_INT is a temporary measure until all call sites in Blink have been updated to use SkRect.

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11692 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 13:51:19 +00:00
skia.committer@gmail.com
f29c380289 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@11691 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 07:01:40 +00:00
commit-bot@chromium.org
824c346b6e Express (GLSL expression, possibly known value) pairs as a class
Express (GLSL expression, possibly known value) pairs as a class
instead of two variables Introduces GrGLSLExpr<N> to encapsulate
the expression and possibly constant-folded value of the expression.

This simplifies passing of the expressions to functions.

Changes the shaders with following patterns:
        { // Stage 0: Linear Gradient
        vec4 colorTemp = mix(uGradientStartColor_Stage0, uGradientEndColor_Stage0, clamp(vMatrixCoord_Stage0.x, 0.0, 1
        colorTemp.rgb *= colorTemp.a;
-       output_Stage0 = vec4((vColor) * (colorTemp));
+       output_Stage0 = (vColor * colorTemp);
+       }

Previously the vector cast was always added if constant folding was
effective, regardless of the term dimensions. Now the vector upcast is
not inserted in places where it is not needed, ie. when the binary
operator term is of the target dimension.

Also, some parentheses can be omitted. It is assumed that
GrGLSLExpr<N>("string") constructors construct a simple expression or
parenthesized expression.

Otherwise the shader code remains identical.

R=jvanverth@google.com, bsalomon@google.com, robertphillips@google.com

Author: kkinnunen@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11690 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 06:30:18 +00:00
commit-bot@chromium.org
ab9d30cb01 basically a typo
R=caryclark@google.com, bsalomon@google.com

Author: yunchao.he@intel.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11689 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-10 02:53:30 +00:00
commit-bot@chromium.org
b5a6651f9f SkDocument api changes (abort, close return success, set DCT encoder...).
R=reed@google.com, reed

Author: edisonn@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11688 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-09 21:09:00 +00:00
edisonn@google.com
c8fda9d96b code cleanup
Review URL: https://codereview.chromium.org/26613006

git-svn-id: http://skia.googlecode.com/svn/trunk@11687 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-09 20:23:12 +00:00
commit-bot@chromium.org
1303761a89 Remove _impl from names in SkOnce.h.
This is entirely to make power users (me, Mike's per-object use case) feel less
bad about calling sk_once() directly with args not created by DEF_SK_ONCE.

BUG=
R=bungeman@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11686 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-09 20:08:20 +00:00
jvanverth@google.com
73d13d70dc Give the new font cache GM a name
BUG=
R=borenet@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11685 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-09 18:53:35 +00:00
commit-bot@chromium.org
235002fb12 low hanging calloc fruit
BUG=
R=reed@google.com, robertphillips@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11683 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-09 18:39:59 +00:00
djsollen@google.com
c9542ca3d0 Add swapBuffer call to SkGLContextHelper.
R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11682 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-09 18:25:38 +00:00
commit-bot@chromium.org
338a49fc55 Add new GM to stress test the GPU font cache for cases similar to
Chromium issue 303803.

BUG=303803

Committed: http://code.google.com/p/skia/source/detail?r=11673

R=robertphillips@google.com

Author: jvanverth@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11680 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-09 18:12:23 +00:00
epoger@google.com
9fb6c8ac9c rebaseline_server: extend returned JSON dict to allow for result-editing in coming CL
(SkipBuildbotRuns)

R=jcgregorio@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11679 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-09 18:05:58 +00:00
jvanverth@google.com
5466b0ebbc Revert "Add new GM to stress test the GPU font cache"
git-svn-id: http://skia.googlecode.com/svn/trunk@11678 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-09 17:03:22 +00:00