Commit Graph

9115 Commits

Author SHA1 Message Date
scroggo@google.com
1d06999bc2 Fix build.
Predeclare a function.

Unreviewed.

git-svn-id: http://skia.googlecode.com/svn/trunk@11559 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-01 17:46:35 +00:00
scroggo@google.com
8d2392487c Add an option on SkImageDecoder to skip writing 0s.
Only implemented for PNG.

Add a getter and setter, and sets the default to false in the
constructor. Also copies the setting in copyFieldsToOther.

Fix an indpendent bug where fDitherImage was not being copied in
copyFieldsToOther.

In SkScaledBitmapSampler::begin, consolidate the settings passed in
by passing a const reference to the decoder. The decoder can be
referenced for its settings of dither, unpremultiplied, and now
skipping writing zeroes. Update callers to use the new API. In png
decoder, rather than passing around a pointer to an initial
read of getDitherImage, and potentially changing it, look at the
field on the decoder itself, and modify it directly. This is a
change in behavior - now if that same decoder is used to decode
a different image, the dither setting has changed. I think this is
okay because A) the typical use case is to use a new decoder for
each decode, B) we do not make any promises that a decode does not
change the decoder and C) it makes the code in SkScaledBitmapSampler
much cleaner.

In SkScaledBitmapScampler, add new row procs for skipping zeroes. Now
that choosing the row proc has five dimensions (src config, dst config,
dither, skip writing zeroes, unpremultiplied), use a new method: each
src/dst combination has a function for choosing the right proc depending
on the decoder.

SkScaledBitmapScampler::RowProc is now public for convenience.

Remove Sample_Gray_D8888_Unpremul, which is effectively no different
from Sample_Gray_D8888.

In cases where unpremultiplied was trivial, such as 565 and when
sampling from gray, decoding may now succeed.

Add a benchmark (currently disabled) for comparing the speed of skipping
writing zeroes versus not skipping. For this particular image, which is
mostly transparent pixels, normal decoding took about 3.6 milliseconds,
while skipping zeroes in the decode took only about 2.5 milliseconds
(this is on a Nexus 4). Presumably it would be slower on an image
with a small amount of transparency, but there will be no slowdown
for an image which reports that it has no transparency.

In SkImageRef_ashmem, always skip writing zeroes, since ashmem
memory is guaranteed to be initialized to 0.

Add a flag to skip writing zeroes in skimage.

Add a regression test for choosing the rowproc to ensure I did not
change any behavior accidentally.

BUG=skia:1661
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11558 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-01 17:27:15 +00:00
djsollen@google.com
3702b2587c Fix ninja build on Android
R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11555 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-01 15:31:54 +00:00
scroggo@google.com
12705329d0 Allow creating a picture from skp to fail.
Replace the current constructor for creating an
SkPicturePlayback to a factory. In the factory,
check for incorrect data that would result in an invalid
playback. If the playback is invalid, return NULL, and
return NULL from SkPicture's factory as well.

Update SkTimedPicture(Playback) as well.

BUG=skia:1672
R=caryclark@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11554 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-01 15:30:46 +00:00
bungeman@google.com
635091f0a9 Minor changes to XPS device.
git-svn-id: http://skia.googlecode.com/svn/trunk@11552 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-01 15:03:18 +00:00
borenet@google.com
9a112f5605 Reverted r11547; filing bugs for 64-bit warnings
Review URL: https://codereview.chromium.org/25530002

git-svn-id: http://skia.googlecode.com/svn/trunk@11551 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-01 13:54:16 +00:00
borenet@google.com
bb8c321eeb Whitespace change to trigger builds after r11547: Always use WERR for skia_lib
Review URL: https://codereview.chromium.org/25521002

git-svn-id: http://skia.googlecode.com/svn/trunk@11548 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-01 13:22:07 +00:00
skia.committer@gmail.com
1d3bfdc341 Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@11544 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-01 07:01:46 +00:00
mtklein@google.com
fe21538138 fix the android build. now both android_ninja _and_ android_make work.
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11542 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 20:58:48 +00:00
mtklein@google.com
cf0573fc69 VERBOSE -> SKIA_ANDROID_VERBOSE_SETUP
BUG=
R=borenet@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11541 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 20:53:36 +00:00
mtklein@google.com
1c4015ab14 make vanilla android_ninja work, and add quiet options
BUG=
R=djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11540 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 20:42:10 +00:00
djsollen@google.com
0b499ae6ba Remove uneeded copy of gdbserver from apk
R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11539 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 20:33:21 +00:00
bsalomon@google.com
b016f41c34 Reduce max number of textures to 4 to make room for a larger class id in effect key
git-svn-id: http://skia.googlecode.com/svn/trunk@11538 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 19:57:15 +00:00
commit-bot@chromium.org
234d4fba75 Mark when effects and programs have vertex code
Adds a 'hasVertexCode' method to GrEffect and a 'fHasVertexCode' field
to GrGLProgramDesc::KeyHeader. Also adds a GrVertexEffect class that
effects have to inherit from in order to set the 'hasVertexCode' flag
and be able to emit vertex code, and updates the existing effects to
use it as needed.

R=bsalomon@google.com

Author: cdalton@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11537 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 19:55:49 +00:00
commit-bot@chromium.org
3400f4b00a Add 3 color variant to gradient bench, include scale in name, add more benchs
R=reed@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11536 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 19:41:09 +00:00
mtklein@google.com
efcef6a7cb fix Android release builds
BUG=
R=djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11535 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 19:23:05 +00:00
commit-bot@chromium.org
76eaf749cf Add a GrCustomCoordsTextureEffect class
Extracts a GrCustomCoordsTextureEffect class from
GrSimpleTextureEffect. This way there are no effects that can
conditionally require a vertex shader. They either always need one or
never do. Also removes kCustom_CoordsType from the CoordsType enum in
GrEffect (that enum is really only meant for coords provided by the
framework), and updates GrSimpleTextureEffect::TestCreate to make the
effect with position as well, instead of just local coords.

R=bsalomon@google.com

Author: cdalton@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11531 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 18:41:38 +00:00
commit-bot@chromium.org
1e10a9a207 quiet down more third-party warnings in poppler and jsoncpp
BUG=
R=djsollen@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11530 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 18:19:26 +00:00
djsollen@google.com
06b7209ef7 remove unecessary warnings from third_party code
R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11529 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 18:06:34 +00:00
commit-bot@chromium.org
6c5d9a1dff Add GrSurface::savePixels().
R=bsalomon@google.com

Author: jvanverth@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11528 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 18:05:43 +00:00
mtklein@google.com
48f9e1f2c1 Add android_ninja, like android_make for ninja.
android_ninja {tests,bench,gm,bench_pictures,render_pictures} all build and run
fine.  They build so fast I thought maybe they were broken.

Note that android_ninja with no argument is failing:
    ninja: Entering directory `out/config/android-arm_v7_thumb/Debug'
    ninja: error: 'lib.target/libSampleApp.so', needed by 'android/libs/armeabi-v7a/libSampleApp.so', missing and no known rule to make it
Will look into this.

BUG=
R=djsollen@google.com

Committed: https://code.google.com/p/skia/source/detail?r=11525

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11527 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 17:32:09 +00:00
mtklein@google.com
741ea9e009 Revert "Add android_ninja, like android_make for ninja."
Broke some builds.  Will try again.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11526 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 17:22:48 +00:00
mtklein@google.com
9eecef0744 Add android_ninja, like android_make for ninja.
android_ninja {tests,bench,gm,bench_pictures,render_pictures} all build and run
fine.  They build so fast I thought maybe they were broken.

Note that android_ninja with no argument is failing:
    ninja: Entering directory `out/config/android-arm_v7_thumb/Debug'
    ninja: error: 'lib.target/libSampleApp.so', needed by 'android/libs/armeabi-v7a/libSampleApp.so', missing and no known rule to make it
Will look into this.

BUG=
R=djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11525 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 17:13:58 +00:00
epoger@google.com
4b00412a4c Ignore flaky shadertext2_pdf-poppler tests on Mac-10.7 Release builds
BUG=skia:1692
TBR=edisonn

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11524 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 15:46:50 +00:00
commit-bot@chromium.org
410552a73d Move the GL shader compilation step into GrGLShaderBuilder
Moves the compilation step and a few other blocks of code from
GrGLProgram to GrGLShaderBuilder. This way GrGLProgram doesn't have to
know whether or not there is a vertex shader.

R=bsalomon@google.com

Author: cdalton@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11523 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 15:30:27 +00:00
commit-bot@chromium.org
a4acf12a93 Revert "Add a requiresVertexShader method to GrGLEffect"
This reverts commit 1a30a3af805b7ea688d4a0f0bfe373c204085a27. We're
going to take a different direction for vertexless shaders.

R=bsalomon@google.com

Author: cdalton@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11521 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 15:13:58 +00:00
epoger@google.com
afaad3dd70 HTTP GM results viewer: server now returns category summaries along with testData
(SkipBuildbotRuns)

R=borenet@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11520 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 15:06:25 +00:00
epoger@google.com
5e49738c99 revert temporary r11517
Review URL: https://codereview.chromium.org/25215002

git-svn-id: http://skia.googlecode.com/svn/trunk@11518 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 07:01:55 +00:00
epoger@google.com
19fcd8e2ef gm: temporarily re-enable multiple rendermodes, to make sure they haven't regressed
Review URL: https://codereview.chromium.org/25213002

git-svn-id: http://skia.googlecode.com/svn/trunk@11517 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-30 06:29:19 +00:00
robertphillips@google.com
09bbb72eb9 More image rebaselines
https://codereview.chromium.org/25184002/



git-svn-id: http://skia.googlecode.com/svn/trunk@11516 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-29 17:57:36 +00:00
robertphillips@google.com
650ead2f1b Added SK_API to SkPathRef.h
git-svn-id: http://skia.googlecode.com/svn/trunk@11515 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-29 14:48:38 +00:00
skia.committer@gmail.com
50df4d013f Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@11513 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-28 07:01:33 +00:00
robertphillips@google.com
7fb8959085 Rebaselining some stragglers
https://codereview.chromium.org/25098008/



git-svn-id: http://skia.googlecode.com/svn/trunk@11512 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-27 23:18:16 +00:00
robertphillips@google.com
6e7883b84f Limit warning message to de-clutter bench output logs
https://codereview.chromium.org/25112002/



git-svn-id: http://skia.googlecode.com/svn/trunk@11511 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-27 21:53:39 +00:00
robertphillips@google.com
ea493b3c77 Rebaseline after quadratic-circle approximation change
https://codereview.chromium.org/25078003/



git-svn-id: http://skia.googlecode.com/svn/trunk@11510 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-27 21:50:21 +00:00
bsalomon@google.com
c65d1053a9 Rebaseline inconsequential changes to quadclosepath on N10 msaa4
R=epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11509 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-27 21:22:45 +00:00
commit-bot@chromium.org
7d330eb19c GrAtlas cleanup: Split out GrPlot and GrAtlas
This breaks up GrAtlas into the head of the list (GrAtlas) and the list elements (GrPlot). It also moves all of the GrPlot management code into GrAtlasMgr. It adds a simple pool allocator for GrPlots and removes use of GrPlotMgr.

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

Author: jvanverth@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11508 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-27 19:39:38 +00:00
robertphillips@google.com
3e292aa398 Move unlikely-to-be-inlined code from SkPathRef.h to SkPathRef.cpp
https://codereview.chromium.org/24998004/



git-svn-id: http://skia.googlecode.com/svn/trunk@11506 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-27 17:48:49 +00:00
robertphillips@google.com
def1a0be2e Added two more GMs to the suppressions file
git-svn-id: http://skia.googlecode.com/svn/trunk@11505 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-27 17:36:22 +00:00
robertphillips@google.com
b0889a5aa6 This CL effectively reverts:
r5997 Altered arcTo's canonical points to (usually) be convex (https://codereview.appspot.com/6709051/)
r9928 GM (and fix) for drawArc capping issue (https://codereview.chromium.org/18271003/)

Instead of pushing some of the on-curve points out to attain convexity, this patch pulls all the off curve points in.

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11504 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-27 17:05:59 +00:00
sugoi@google.com
2b0945f745 Adding gms for tileimagefilter and offsetimagefilter
BUG=skia:1684

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11501 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-27 15:08:53 +00:00
epoger@google.com
f9d134da93 Create HTTP-based GM results viewer.
For now, it only allows VIEWING results... next, it will allow the user to
rebaseline GM results via the web interface.

R=borenet@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11500 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-27 15:02:44 +00:00
sugoi@google.com
d0b43d718b Rebaselining xfermodeimagefilter
Adding new baselines and removing the line in ignore-tests.txt

BUG=
R=bsalomon@google.com, epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11499 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-27 15:00:22 +00:00
borenet@google.com
c569327afb Fix android_run_skia
If STATUS_FILENAME doesn't exist, exit 1.

R=djsollen@google.com, jvanverth@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11498 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-27 14:28:45 +00:00
mtklein@google.com
9cb5177619 Fix asan build. Duh, don't return a stack address...
BUG=
R=robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11497 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-27 13:39:14 +00:00
robertphillips@google.com
bdaed95e3f Rebaseline hairline images & remove suppression
https://codereview.chromium.org/25045002/



git-svn-id: http://skia.googlecode.com/svn/trunk@11496 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-27 13:33:17 +00:00
robertphillips@google.com
080958599e Compiler warning/error fix for Chromium
git-svn-id: http://skia.googlecode.com/svn/trunk@11494 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-27 12:27:27 +00:00
skia.committer@gmail.com
65caeaf32d Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@11493 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-27 07:01:29 +00:00
scroggo@google.com
9822565d3e Whitespace change to trigger build.
git-svn-id: http://skia.googlecode.com/svn/trunk@11492 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-26 22:58:20 +00:00
scroggo@google.com
fd67f2f0a3 Fix a warning.
git-svn-id: http://skia.googlecode.com/svn/trunk@11489 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-26 21:49:46 +00:00