Commit Graph

9580 Commits

Author SHA1 Message Date
commit-bot@chromium.org
c0b7e10c6a Initial error handling code
I made it as simple as possible. The impact seems minimal and it should do what's necessary to make this code secure.

BUG=

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

R=reed@google.com, scroggo@google.com, djsollen@google.com, sugoi@google.com, bsalomon@google.com, mtklein@google.com, senorblanco@google.com, senorblanco@chromium.org

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11922 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-23 17:06:21 +00:00
commit-bot@chromium.org
759befb72c use the supplied matrix instead of the texture w/h div for the bicubic GPU effect
BUG=
R=bsalomon@google.com, caryclark@google.com

Author: humper@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11921 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-23 16:18:50 +00:00
commit-bot@chromium.org
a8aef8bf04 Lighting filter uses input on raster path
BUG=
R=senorblanco@chromium.org

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11918 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-23 15:33:44 +00:00
commit-bot@chromium.org
3f80dd5f01 Add support for reading non-rendertarget textures.
Also removes rendertarget flag from GrAtlas texture creation (no
longer needed) and re-enables GrFontCache::dump().

R=robertphillips@google.com

Author: jvanverth@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11917 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-23 15:32:39 +00:00
mtklein@google.com
338a66481e TSAN build fix: forgot to pass the address into ANNOTATE_BENIGN_RACE.
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11916 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-23 15:24:27 +00:00
epoger@google.com
eb832599b6 rebaseline_server: add tabs, and ability to submit new baselines to the server
Tabs allow the user to divide the tests into groups:
hide these for now, approve these, etc.

(SkipBuildbotRuns)

R=borenet@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11915 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-23 15:07:26 +00:00
commit-bot@chromium.org
1f81fd6546 SK_ONCE for SkData and SkPathRef
Adds SK_ONCE_FRIEND, to allow SK_DEF_ONCE code to be friends with a class.  This had to go in include/core to be visible to headers there.

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

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11914 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-23 14:44:08 +00:00
senorblanco@chromium.org
fbcd415aa0 Remove GrContext from SkXfermode::[Aa]sNewEffectOrCoeff() and all subclasses,
since it's unused.

R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11913 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-23 14:03:22 +00:00
commit-bot@chromium.org
a34995e18b Implement SkColorFilter as a GrGLEffect
Adds GrEffect::willUseInputColor() which indicates whether or not the
input color affects the output of the effect. This is needed for
certain Xfermodes, such as kSrc_Mode. For these modes the color filter
will not use the input color.

An effect with GrEffect::willUseInputColor() true will cause all color
or coverage effects before it to be discarded, as their computations
cannot affect the output. In these cases program is marked as having
white input color.

This fixes an assert when Skia is compiled in a mode that prefers
using uniforms instead of attributes for constants. (Flags
GR_GL_USE_NV_PATH_RENDERING or GR_GL_NO_CONSTANT_ATTRIBUTES). Using
attributes hides the problem where the fragment shader does not need
input color for color filters that ignore DST part of the filter. The
assert would be hit when uniform manager tries to bind an uniform which
has been optimized away by the shader compiler.

Adds specific GrGLSLExpr4 and GrGLSLExpr1 classes. This way the GLSL
expressions like "(v - src.a)" can remain somewhat readable in form of
"(v - src.a())". The GrGLSLExpr<typename> template implements the
generic functionality, GrGLSLExprX is the specialization that exposes
the type-safe interface to this functionality.

Also adds operators so that GLSL binary operators of the form
"(float * vecX)" can be expressed in C++. Before only the equivalent
"(vecX * float)" was possible. This reverts the common blending
calculations to more conventional order, such as "(1-a) * c" instead of
"c * (1-a)".

Changes GrGLSLExpr1::OnesStr from 1 to 1.0 in order to preserve the
color filter blending formula string the same (with the exception of
variable name change).

Shaders change in case of input color being needed:
 -   vec4 filteredColor;
 -   filteredColor = (((1.0 - uFilterColor.a) * output_Stage0) + uFilterColor);
 -   fsColorOut = filteredColor;
 +   vec4 output_Stage1;
 +   { // Stage 1: ModeColorFilterEffect
 +   output_Stage1 = (((1.0 - uFilterColor_Stage1.a) * output_Stage0) + uFilterColor_Stage1);
 +   }
 +   fsColorOut = output_Stage1;

Shaders change in case of input color being not needed:
 -uniform vec4 uFilterColor;
 -in vec4 vColor;
 +uniform vec4 uFilterColor_Stage0;
  out vec4 fsColorOut;
  void main() {
 -   vec4 filteredColor;
 -   filteredColor = uFilterColor;
 -   fsColorOut = filteredColor;
 +   vec4 output_Stage0;
 +   { // Stage 0: ModeColorFilterEffect
 +   output_Stage0 = uFilterColor_Stage0;
 +   }
 +   fsColorOut = output_Stage0;
  }

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

Author: kkinnunen@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11912 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-23 05:42:03 +00:00
sugoi@google.com
afba64434d New gm expectations for imagemagnifier
git-svn-id: http://skia.googlecode.com/svn/trunk@11911 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-22 19:42:10 +00:00
edisonn@google.com
5237b7fb0e Fix a test warning on some linux machines
R=sugoi@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11910 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-22 18:33:21 +00:00
bsalomon@google.com
7ce564cccb Revert "If the path is a rect, call drawRect to raster the geometry in SkCanvas::drawPath to get better performance."
This reverts commit r11904

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11909 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-22 16:54:15 +00:00
reed@google.com
c294a97842 if fBitmap is still NULL, return false
git-svn-id: http://skia.googlecode.com/svn/trunk@11908 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-22 16:17:29 +00:00
commit-bot@chromium.org
8c908273bb add tests for SkDocument
R=reed@google.com, vandebo@chromium.org

Author: edisonn@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11907 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-22 14:49:03 +00:00
bsalomon@google.com
a5f30e9675 Add strokerect to ignored tests list
Review URL: https://codereview.chromium.org/35223003

git-svn-id: http://skia.googlecode.com/svn/trunk@11906 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-22 13:52:47 +00:00
bsalomon@google.com
ad254fee73 If the path is a rect, call drawRect to raster the geometry in SkCanvas::drawPath to get better performance.
Committed: http://code.google.com/p/skia/source/detail?r=11842

R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11904 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-22 13:19:12 +00:00
skia.committer@gmail.com
db6fa1729a Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@11903 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-22 07:02:30 +00:00
scroggo@google.com
5187c4313c More work to integrate skimage with rebaseline tools.
tools/skimage_main.cpp:
Add the ability to write the results to checksum based filenames,
much like GM uses. This will allow using the skpdiff server to
rebaseline images.
Write the keys in the JSON file as <original image>_<pref config>.png,
so it matches gm_json.IMAGE_FILENAME_PATTERN. Also replace '_' with
'-' in the original file name, to avoid confusing the pattern matcher.
The '_' to '-' replacement also happens on the output filename.
Read the keys in a similar manner.
In make_outname, no longer remove a suffix. This fixes a bug where
subset decoding writes multiple subsets to the same file.

tools/rebaseline.py:
Since the filenames written to json files now match
gm_json.IMAGE_FILENAME_PATTERN, enable the option to match based
on configs/tests when rebaselining skimage.

test json files:
Update to match the new format of output.

gm/gm_expectations:
Add a constructor that takes a BitmapAndDigest as input.

tools/tests/skimage_self_test.py:
Test that reading the expectations file just created by skimage with
the same file actually compares to the original file (rather than just
succeeding because expectations were missing).

Change the expectations files to match the new format.

Will require a buildbot change to use the new flag: https://codereview.chromium.org/27389002/

BUG=1466
R=epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11902 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-22 00:42:46 +00:00
senorblanco@chromium.org
380355eff3 Xoom rebaselines.
Note: Some of these had no base versions in GS corresponding to the hashes in the JSON, causing the svndiff script to barf. I hacked it up to let me finish, but it should probably handle the case of a missing hash more gracefully.

TBR=epoger

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11900 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 22:00:47 +00:00
robertphillips@google.com
dbbe1d437d Revert r11880 (Apply matrix early in draw bitmap - https://codereview.chromium.org/30593003) due to layout test failure
git-svn-id: http://skia.googlecode.com/svn/trunk@11899 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 21:30:49 +00:00
mtklein@google.com
4c2af74078 GrTHashCache -> GrTHashTable
The class is Table, but the file's Cache.  That's confusing.

BUG=
R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11898 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 21:04:06 +00:00
scroggo@google.com
5ee18dd201 Image decoder fixes (mostly) around A8.
Opaquness:
When decoding Gray to A8 in libpng, set reallyHasAlpha to true
and add a comment why we do not check for the real answer.

Add comments in jpeg decoder explaining why A8 is not opaque.

Fix a bug where an A8 subset is considered to be opaque.

Other fixes:
In SkJPEGImageDecoder, only allocate as much memory as
needed for each source row, based on the input config.
Also pull out common code into a static function.

When performing the check for requiring unpremultiplied colors,
allow A8 to succeed, since that setting should have no effect on
A8.

Add the check for requiring unpremultiplied colors to subset
decoding.

Fix a bug where attempting to sample gray to A8 does not sample.

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11897 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 20:47:31 +00:00
reed@google.com
114038a2e2 Revert "Revert "cache SkImage::Info calculation in lazypixelref""
This reverts commit 81eba32ab10f9210c742938819cf1218be5611c9.

ImageDecoder is changed to allow info to be NULL, since it is an output-only parameter.

R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11896 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 20:13:42 +00:00
reed@google.com
e986b221ee Revert "cache SkImage::Info calculation in lazypixelref"
This reverts commit a2537480710aa10b9ab9f8aec98538b79539f47e.

git-svn-id: http://skia.googlecode.com/svn/trunk@11894 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 19:45:38 +00:00
reed@google.com
2590a91b64 cache SkImage::Info calculation in lazypixelref
BUG=
R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11893 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 18:58:17 +00:00
bungeman@google.com
0d00976bd3 Roll gyp from r1684 to r1765.
R=epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11892 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 18:49:43 +00:00
senorblanco@chromium.org
8204743fdb ChromeOS and IntelRhb rebaselines.
TBR=robertphillips

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11891 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 18:46:49 +00:00
commit-bot@chromium.org
192cbf67b2 DM: add --serialize
Plus:
  - minor ReplayTask refactoring to share code with SerializeTask
  - move --replay to ReplayTask and --serialize to SerializeTask like WriteTask
  - when --writePath is given, write failures for Replay and Serialize tasks
  - function names have fewer blatant Skia style violations

BUG=
R=bsalomon@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11890 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 18:40:25 +00:00
senorblanco@chromium.org
ad6d35bbf9 Third round of matrixconvolution rebaselines, and removal from ignored-tests.txt.
"We have normality. I repeat, we have normality. Anything you still can't cope with is therefore your own problem."

TBR=robertphillips
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11889 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 18:23:30 +00:00
robertphillips@google.com
950b1b079a Fix out of order destruction error
https://codereview.chromium.org/33203002/



git-svn-id: http://skia.googlecode.com/svn/trunk@11888 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 17:37:28 +00:00
epoger@google.com
00434ec9e8 GM: remove deprecated --ignoreTests flag
BUG=skia:1730
R=borenet@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11887 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 17:25:26 +00:00
commit-bot@chromium.org
8c294900f3 Add DPI stettings to SkDocument::CreatePDF(). Tests will be added in a future cl, once DPI will be used in SkPDFDevice
R=reed@google.com, bungeman@google.com, vandebo@chromium.org

Author: edisonn@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11886 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 17:14:37 +00:00
senorblanco@chromium.org
9f51d16b54 Second round of matrixconvolution rebaselines.
TBR=robertphillips
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11885 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 17:04:11 +00:00
commit-bot@chromium.org
4b7d673089 More clang warning fixes.
Mostly unused functions and variables removed.

BUG=None
TEST=ninja -C out/Debug most
     ninja -C out/Release most

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

Author: tfarina@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11884 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 16:41:00 +00:00
commit-bot@chromium.org
f642f8cf90 Magnifier gpu path fix
The y axis was inverted for the offset, which should have been computed on the other side of the magnifying rectangle.

BUG=
R=bsalomon@google.com, senorblanco@google.com, senorblanco@chromium.org

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11883 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 15:59:26 +00:00
senorblanco@chromium.org
718f5e2b7c First round of matrixconvolution rebaselines.
TBR=robertphillips

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11882 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 15:41:55 +00:00
commit-bot@chromium.org
8e919add40 Fix GrProgramsTest to not generate tests with too many TexCoord references
Make GrProgramsTest check how many texture coordinate sets are
available and select random effects up until the amount runs out.

Otherwise, following effect sequence would fail the shader compilation
when Skia is compiled with nv_path_rendering on (eg. when fixed
function codepath is used):
 * Stage 0: TextureDomain (1 texcoord)
 * Stage 1: Convolution (1 texcoord)
 * Stage 2: Bitmap Alpha Threshold (2 texcoords)
 * Stage 3: DisplacementMap (2 texcoords)
 * Stage 4: Config Conversion (1 texcoords)
 * Stage 5: Two-Point Conical Gradient (2 texcoords)

This would use more texture coordinate sets than 8, which is fairly
common amount currently.

R=bsalomon@google.com, cdalton@nvidia.com

Author: kkinnunen@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11881 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 14:48:23 +00:00
commit-bot@chromium.org
15455b2a13 Apply matrix early in draw bitmap
R=robertphillips@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11880 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 14:48:17 +00:00
reed@google.com
e7e29b7815 scope ComputeIsOpaque with SkBitmap
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11879 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 14:31:20 +00:00
reed@google.com
9cd697c696 change ERROR label to BAD_CONFIG -- avoid windows complaint
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11878 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 14:12:13 +00:00
reed@google.com
383a697692 store SkAlphaType inside SkBitmap, on road to support unpremul
BUG=
R=bsalomon@google.com, scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11877 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 14:00:07 +00:00
robertphillips@google.com
c2eae47954 Reverting revert of r11862 (Constify SkFlattenable::getFactory()) or reverting r11871.
git-svn-id: http://skia.googlecode.com/svn/trunk@11876 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 12:26:10 +00:00
robertphillips@google.com
466ea91886 A few stragglers for r1187 (Fix cubic->quad RR corner regression)
https://codereview.chromium.org/31333002/



git-svn-id: http://skia.googlecode.com/svn/trunk@11875 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-21 00:15:15 +00:00
robertphillips@google.com
7c4d5124d1 More rebaselines for r1187 (Fix cubic->quad RR corner regression)
https://codereview.chromium.org/31323002/



git-svn-id: http://skia.googlecode.com/svn/trunk@11874 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-20 23:53:11 +00:00
robertphillips@google.com
d8b0a148c5 rebaselines after r1187 (Fix cubic->quad RR corner regression)
https://codereview.chromium.org/31313002/



git-svn-id: http://skia.googlecode.com/svn/trunk@11873 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-20 23:06:40 +00:00
senorblanco@chromium.org
2a4223c783 Fix for cropped matrix convolution for BottomLeft render targets.
R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11872 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-20 20:21:19 +00:00
robertphillips@google.com
b5e391025e Reverted due to Chromium compilation failures. Please see:
https://codereview.chromium.org/30973002/



git-svn-id: http://skia.googlecode.com/svn/trunk@11871 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-20 13:34:21 +00:00
robertphillips@google.com
123671901a Fix cubic->quad RR corner regression
https://codereview.chromium.org/29673002/



git-svn-id: http://skia.googlecode.com/svn/trunk@11870 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-20 13:11:16 +00:00
skia.committer@gmail.com
b3c2da312f Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@11869 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-19 07:02:35 +00:00
vandebo@chromium.org
1c87672883 Revert "[PDF] Add unpremultiply support and a GM (try3)."
This is crashing in some configurations, can now repro.

This reverts commit 12add177d0ab7bbac97f5093c9382924d88bde8c.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11868 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-18 21:04:51 +00:00