Commit Graph

1552 Commits

Author SHA1 Message Date
commit-bot@chromium.org
4a8e17d52d remove poplar building from mac, until it is fixed
BUG=skia:2008
R=mtklein@google.com, vandebo@chromium.org

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13020 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-10 17:21:00 +00:00
commit-bot@chromium.org
83f56922e2 Fix Mac fontconfig build (try 2)
The Mac fontconfig just #defines the cache directory, which works fine if fontconfig never has to look up any fonts (the case until now). If it has to actually find fonts from the disk, the cache directory and config directory need to be properly defined as well as running fc-cache to populate the cache directory.

Populating the cache directory can take some time, but should only happen on a clean build. To remove this extra time, we have to not build poppler on Mac, which can now be accomplished with GYP_DEFINES="skia_mac_poppler=0"

R=epoger@google.com

Author: vandebo@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13007 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-09 22:54:26 +00:00
commit-bot@chromium.org
32eea431de Revert of https://codereview.chromium.org/113203003/
Reason for revert: Broken under XCode.

R=bungeman@google.com, epoger@google.com
TBR=bungeman@google.com, epoger@google.com
NOTREECHECKS=true
NOTRY=true

Author: vandebo@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12997 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-09 17:52:54 +00:00
commit-bot@chromium.org
9a907fa0d3 Fix Mac fontconfig build
The Mac fontconfig just #defines the cache directory, which works fine if fontconfig never has to look up any fonts (the case until now).  If it has to actually find fonts from the disk, the cache directory and config directory need to be properly defined as well as running fc-cache to populate the cache directory.

Populating the cache directory can take some time, but should only happen on a clean build.  To remove this extra time, we have to not build poppler on Mac, which can now be accomplished with GYP_DEFINES="skia_mac_poppler=0"

R=bungeman@google.com, epoger@google.com

Author: vandebo@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12994 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-09 17:37:38 +00:00
commit-bot@chromium.org
d08d23b385 Small tweaks to be able to build everything target:
- fParsed is unused.
 - Quiet down a bogus -Wuninitialized warning in QWeakPointer.
Tested Clang and GCC on Linux.



BUG=
R=bungeman@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12970 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-08 21:16:14 +00:00
commit-bot@chromium.org
d9c4dfb170 Move DM from everything to most, to build it by default.
BUG=
R=reed@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12962 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-08 16:52:42 +00:00
commit-bot@chromium.org
b163984ae7 Move v8 into third_party.
BUG=
R=robertphillips@google.com

Author: jcgregorio@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12954 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-08 15:14:09 +00:00
commit-bot@chromium.org
91e099e01d Update utils.gyp to find SkNoSaveLayerCanvas.h in 'src'.
R=robertphillips@google.com

Author: bungeman@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12947 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-07 20:11:38 +00:00
commit-bot@chromium.org
85facf71ef Add StackBench to measure performance on stack-like (fixed element size) work loads.
BUG=303282
R=reed@google.com, caryclark@google.com, mtklein@chromium.org

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12940 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-07 17:03:31 +00:00
robertphillips@google.com
81e8739a10 NoSaveLayerCanvas now its own file
https://codereview.chromium.org/120553003/



git-svn-id: http://skia.googlecode.com/svn/trunk@12938 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-07 16:08:04 +00:00
commit-bot@chromium.org
40eb3c1000 Add AlphaThreshold filter.
This is based on the Bitmap Alpha Threshold filter, and will be used by Chromium
to implement the window shape API.

R=bsalomon@chromium.org, wez@chromium.org, bsalomon@google.com, reed@google.com

Author: zork@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12935 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-06 23:41:14 +00:00
commit-bot@chromium.org
c8d732800e Renamed JsCanvas to JsContext and moved into it's own file.
Fleshed out a lot of the Path interface.

BUG=
R=robertphillips@google.com, tfarina@chromium.org, reed@google.com

Author: jcgregorio@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12913 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-06 18:17:24 +00:00
commit-bot@chromium.org
d4bda508c9 Add SkPreConfig.h to core.gypi
BUG=
R=reed@google.com

Author: borenet@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12886 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-03 17:25:52 +00:00
commit-bot@chromium.org
c735598ce5 take 2: create simple 'skpmaker' tool to generate SKP files for testing
(re-landing https://codereview.chromium.org/108343006 without the build breakages)

BUG=skia:1943
R=rmistry@google.com

Author: epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12866 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-02 19:42:15 +00:00
commit-bot@chromium.org
5ccdf01fff Revert of https://codereview.chromium.org/108343006/
Reason for revert: broke some builds

R=rmistry@google.com, mtklein@google.com
TBR=mtklein@google.com, rmistry@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:1943

Author: epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12865 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-02 18:51:38 +00:00
commit-bot@chromium.org
dbd8379e5f create simple 'skpmaker' tool to generate SKP files for testing
(needed to create self-test for render_pictures)

BUG=skia:1943
R=rmistry@google.com, mtklein@google.com

Author: epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12864 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-02 18:10:34 +00:00
halcanary@google.com
1bed687f6b Add a release procedure to SkMallocPixelRef; remove SkDataPixelRef
This works in a way that is similar to SkData.

SkMallocPixelRef::NewWithProc

    Motivation: Chrome has a ETC1PixelRef which calls delete[] on the
    pixles on destruction.  There is no reason for them to almost
    duplicate our class, when we can provide them a more flexible
    class.  Example use:

      static void delete_uint8_proc(void* ptr, void*) {
        delete[] static_cast<uint8_t>(ptr);
      }
      SkPixelRef* new_delete_pixref(const SkImageInfo& info,
                                    SkColorTable* ctable) {
        size_t rb = info.minRowBytes();
        return SkMallocPixelRef::NewWithProc(
          info, rb, ctable,
          new uint8_t[info.getSafeSize(rb)],
          delete_uint8_proc, NULL);
      }

SkMallocPixelRef::NewWithData

	Motivation:  This allows up to eliminate SkDataPixelRef.  We
    modified SkImage_Raster to use MallocPixelRef rather than
    SkDataPixlRef.

Also:  Unit tests in tests/MallocPixelRefTest.

BUG=
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12861 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-02 17:29:28 +00:00
commit-bot@chromium.org
261c666682 Make tests output spin on the same line by default.
-v now gives a cleaned-up version of the existing output (every test timed, useless information removed)

Example output, default:
  [ 36/193] PathOpsCubicIntersectionOneOffTest
then later when finished...
  [193/193] BlurMaskFilter

Example output, -v:  (note, codereview is messing up my pretty spacing)
Skia UnitTests: --resourcePath resources SK_RELEASE SK_SCALAR_IS_FLOAT skia_arch_width=32
[  1/193]     0ms PathOpsSimplifyDontFailOneTest
[  2/193]     0ms PathOpsSimplifyFailOneTest
[  3/193]    30ms PathOpsSkpTest
[  4/193]    21ms PathOpsSimplifyFailTest
....
[182/193]  1026ms BlitRow
[183/193]   808ms AAClip
[184/193]  4333ms Math
[185/193]  5068ms PackBits
[186/193]  2265ms DrawText_DrawPosText
[187/193]  9163ms PathOpsRectsThreadedTest
[188/193]  5540ms GLPrograms
[189/193]     0ms GLInterfaceValidation
[190/193]     2ms DeferredCanvas
[191/193]     1ms ClipCache
[192/193]    30ms BlurMaskFilter
[193/193] 10396ms PathOpsOpCubicsThreadedTest
Finished 193 tests, 0 failures, 0 skipped.  (622610 internal tests)

BUG=
R=halcanary@google.com, mtklein@google.com, bungeman@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12860 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-02 16:19:53 +00:00
reed@google.com
85e143c33c reenable vertices gm, adding picture support
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12845 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-30 15:51:25 +00:00
mike@reedtribe.org
6adf296a8f disable gm/vertices until I can find/fix all warnings
git-svn-id: http://skia.googlecode.com/svn/trunk@12837 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-30 04:34:44 +00:00
mike@reedtribe.org
0c87ea8082 add gm::vertices
git-svn-id: http://skia.googlecode.com/svn/trunk@12834 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-30 04:07:34 +00:00
reed@google.com
1915fd09f3 remove unused SkFixed and SkFract functions
BUG=
R=caryclark@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12767 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-19 14:22:03 +00:00
commit-bot@chromium.org
9cfa287bc7 Remove SkBitmapAlphaThresholdShader
R=bsalomon@google.com

Author: zork@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12759 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-18 21:58:53 +00:00
robertphillips@google.com
94d8f1ed61 Update bench pictures to time image decode & upload costs
https://codereview.chromium.org/117583002/



git-svn-id: http://skia.googlecode.com/svn/trunk@12742 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-18 17:25:33 +00:00
bungeman@google.com
d9947f605a Split atomic and mutex implementations and make inlinable.
Skia cannot use Chromium's implementation of mutex (Lock) due to static
initializers. However, we would like to be able to use Chromium's
implementation of atomics. This motivates the split of implementation.

Skia's atomic and mutex calls should be inlinable, especially the atomics.
These calls often compile down to very few instructions, and we currently have
the overhead of a function call. This motivates the header implementation.

There is still a desire for the build system to select the implementation, so
the SK_XXX_PLATFORM_H pattern for header files is introduced. This allows the
build system to control which platform specific header files are chosen.

The Chromium side changes (most of which will need to go in before this change
can be found at https://codereview.chromium.org/19477005/ .
The Chromium side changes after this lands can be seen at 
https://codereview.chromium.org/98073013 .

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12738 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-18 15:27:39 +00:00
commit-bot@chromium.org
0fc0dea333 Add a setTimer() function.
Seemed simple, but required adding a Global class that contains all the global state (instance and context) for our running V8 instance. Also moved canvas.inval to be just inval() at the global level.

BUG=
R=robertphillips@google.com

Author: jcgregorio@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12730 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-18 04:45:37 +00:00
reed@google.com
8f4d2306fa remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats
To keep the CL (slightly) managable, this does not make any changes to
existing macros (e.g. SkScalarMul). Just tackling #ifdef constructs this
time around.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12712 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-17 16:44:46 +00:00
commit-bot@chromium.org
48d94b8ce5 Add command line flag for optionally loading JS from external files.
BUG=
R=robertphillips@google.com

Author: jcgregorio@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12692 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-16 18:24:51 +00:00
reed@google.com
3c12840b23 remove SkFP.h and replace SkFP with SkScalar stop respecting SK_SOFTWARE_FLOAT, assume its always false stop respecting SK_SCALAR_SLOW_COMPARES, assume its always false
BUG=
R=caryclark@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12686 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-16 14:17:40 +00:00
reed@google.com
c0784dbd40 remove SkScalarCompare type and header
BUG=
R=fmalita@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12681 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-13 21:16:12 +00:00
commit-bot@chromium.org
a3f882c475 render_pictures: add --writeJsonSummaryPath
Known issues:
- JSON summary will be empty if --writePath not specified also
- testNames within summary do not include the config (8888, gpu, etc.)

BUG=
R=rmistry@google.com

Author: epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12680 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-13 20:52:36 +00:00
halcanary@google.com
4428734907 Allow 0-width SkBitmap in setConfig.
Previously, SkBitmap::setConfig would allow zero height, but not zero
width.  This is changed for consistancy.

A unit test was added.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12673 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-13 18:29:51 +00:00
senorblanco@chromium.org
533330065a Implement an SkPicture image filter source. This is required for the external-SVG reference feature of feImage. It simply plays back an SkPicture to a given destination rect.
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12661 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-12 23:28:52 +00:00
senorblanco@chromium.org
9c5435de44 Revert "Implement an SkPicture image filter source. This is required for the external-SVG reference feature of feImage. It simply plays back an SkPicture to a given destination rect."
This reverts commit a620349a24471546ad2e8f0679774c1f5b4de0a4 (r12656).

git-svn-id: http://skia.googlecode.com/svn/trunk@12657 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-12 22:23:32 +00:00
senorblanco@chromium.org
14e21270f5 Implement an SkPicture image filter source. This is required for the external-SVG reference feature of feImage. It simply plays back an SkPicture to a given destination rect.
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12656 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-12 22:00:34 +00:00
halcanary@google.com
bc55eec80e Implement SkAshmemDiscardableMemory
-   Implement ashmem-backed SkDiscardableMemory subclass:
    This class in only accesible via the SkDiscardableMemory::Create()
    function, which replaces the mock implementation in
    SkDiscardableMemory_none.cpp

-   Added SkDiscardableMemory_ashmem.cpp to the Android port of Skia
    Removed SkDiscardableMemory_none.cpp from the Android port.

-   Added DiscardableMemoryTest.
    Still needs work.

-   SkDiscardablePixelRef Bugfix:
    onLockPixels() now calls SkDELETE on the SkDiscardableMemory pointer
    when it fails to unlock.

-   Improved documentation inside ashmem.h

BUG=
R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12608 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-10 18:33:07 +00:00
vandebo@chromium.org
5f209e6405 Revert "[PDF] Fix font embedding restrictions."
This reverts r12600 and r12601, likely causing crash on Mac.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12604 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-10 17:22:41 +00:00
commit-bot@chromium.org
47fb2b9c67 [PDF] Fix font embedding restrictions.
Stop using restricted font outlines and honor don't subset restriction.

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

Author: vandebo@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12600 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-10 16:32:06 +00:00
robertphillips@google.com
42cc237caf New Composite CSS border object
https://codereview.chromium.org/86263003/



git-svn-id: http://skia.googlecode.com/svn/trunk@12597 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-10 15:19:32 +00:00
commit-bot@chromium.org
99589af4e3 Add support for reading a directory of images with --expectations (-r).
DM writes out its images in a hierarchy that's a little different than GM,
so this can't read GM's output.  But it can read its own, written with -w.

Example usage:
  $ out/Release/dm -w /tmp/baseline
  $ out/Release/dm -r /tmp/baseline -w /tmp/new
  (and optionally)
  $ mkdir /tmp/diff; out/Release/skdiff /tmp/baseline /tmp/new /tmp/diff

GM's IndividualImageExpectationsSource and Expectations are a little too eager
about decoding and hashing the expected images, so I took the opportunity to
add DM::Expectations that mostly replaces skiagm::ExpectationsSource and
skiagm::Expectations in DM.  It mainly exists to move the image decoding and
comparison off the main thread, which would otherwise be a major speed
bottleneck.

I tried to use skiagm code where possible.  One notable place where I differed
is in this new feature.  When -r is a directory of images, DM does no hashing.
It considerably faster to read the expected file into an SkBitmap and do a
byte-for-byte comparison than to hash the two bitmaps and check those.

The example usage above isn't quite working 100% yet.  Expectations on some GMs
fail, even with no binary change.  I haven't pinned down whether this is due to
  - a bug in DM
  - flaky GMs
  - unthreadsafe GMs
  - flaky image decoding
  - unthreadsafe image decoding
  - something else
but I intend to.  Leon, Derek and I have suspected PNG decoding isn't
threadsafe, but are as yet unable to prove it.

I also seem to be able to cause malloc to fail on my laptop if I run too many
configs at once, though I never seem to be using more than ~1G of RAM.  Will
track that down too.

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

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12596 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-10 14:53:16 +00:00
commit-bot@chromium.org
b6872c06e1 Add support for MIPS to android build
R=borenet@google.com, scroggo@google.com

Author: djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12592 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-10 12:53:56 +00:00
reed@google.com
9230ea2971 make info real in SkPixelRef, and add bitmap::asImageInfo
BUG=
R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12586 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-09 22:01:03 +00:00
bsalomon@google.com
ee9fb43774 fix file names in gpu.gypi
Review URL: https://codereview.chromium.org/99193004

git-svn-id: http://skia.googlecode.com/svn/trunk@12572 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-09 18:48:51 +00:00
senorblanco@chromium.org
e93e1dbf0e Implement srcRect and dstRect functionality in SkBitmapSource. This is required for the "preserveAspectRatio" options of SVG's feImage. Covered by new GM "bitmapsource".
This also includes some changes to the xfermodeimagefilter and tileimagefilter GMs to properly handle the CTM. This worked before only because SkBitmapSource was ignoring the CTM. Now that it respects it, we need to give the correct transform. This also means the GMs now work while zoomed. It also implements CTM support for SkTileImageFilter.

NOTE: this will require rebaselining a number of imagefilter GMs on Nexus4, since they render in perspective (using the CTM). The changes to the results should all be improvements.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12571 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-09 18:31:42 +00:00
commit-bot@chromium.org
907fbd53c5 Make texture domain a helper so that it can be incorporated into other effects.
R=robertphillips@google.com, jvanverth@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12569 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-09 17:03:02 +00:00
commit-bot@chromium.org
7842c817e9 Add GM to test bitmap shaders with basic geometry and bitmap masks.
R=reed@google.com, bsalomon@google.com, rmistry@google.com

Author: djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12543 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-06 20:14:39 +00:00
commit-bot@chromium.org
332999eabf Fix #define for distance field fonts
R=robertphillips@google.com

Author: jvanverth@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12536 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-06 18:05:03 +00:00
robertphillips@google.com
40757703bd Reverting 12528 & 12533 (Implement srcRect and dstRect functionality in SkBitmapSource) due to image differences on N4
https://codereview.chromium.org/108623002/



git-svn-id: http://skia.googlecode.com/svn/trunk@12534 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-06 17:44:15 +00:00
commit-bot@chromium.org
094147d522 Implement srcRect and dstRect functionality in SkBitmapSource. This is required for the "preserveAspectRatio" options of SVG's feImage. Covered by new GM "bitmapsource".
This also includes some changes to the xfermodeimagefilter and tileimagefilter GMs to properly handle the CTM. This worked before only because SkBitmapSource was ignoring the CTM. Now that it respects it, we need to give the correct transform. This also means the GMs now work while zoomed.

R=reed@google.com

Author: senorblanco@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12528 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-06 15:59:03 +00:00
senorblanco@chromium.org
899b22ab97 Revert "Implement srcRect and dstRect functionality in SkBitmapSource. This is required for the "preserveAspectRatio" options of SVG's feImage. Covered by new GM "bitmapsource"." until I can sort out the xfermodeimagefilter and tileimagefilter failures.
This reverts commit b26725c8c9755415284c34399e76be098868e01a, aka r12522.

BUG=
TBR=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12523 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-05 23:06:07 +00:00
senorblanco@chromium.org
af35920e6d Implement srcRect and dstRect functionality in SkBitmapSource. This is required for the "preserveAspectRatio" options of SVG's feImage. Covered by new GM "bitmapsource".
Note: I initially implemented this as a fully-generic SkResizeImageFilter, but then I realized that the dstRect should always be transformed by the filter matrix, but that the srcRect should not (since it's specified relative to the dimensions of the original bitmap). Since this would be confusing for someone attempting to use this as a generic resizing filter, I decided to build the functionality into SkBitmapSource instead.

BUG=
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12522 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-05 22:41:53 +00:00
halcanary@google.com
2c7c7ee47d Big Cleanup: SkBitmapFactory, SkLazyPixelRef, SkImageCache
Removed SkBitmapFactory since no clients were using it.  New cache
selection mechanism can simply pass a SkDiscardableMemory::Factory
into the SkDiscardablePixelRef if non-default SkDiscardableMemory
should be used.  Removed BitmapFactoryTest.

SkDiscardableMemory::Factory interface.  Android will need this
functionality in the future inside their BitmapFactory.

Removed SkLazyPixelRef, since it's functionality is now subsumed into
SkDiscardablePixelRef.  Removed LazyPixelRef test.

Modified SkDiscardablePixelRef to optionally allow it to use a
SkDiscardableMemory::Factory.  This tiny change makes it a replacement
for SkLazyPixelRef.  This functioanlity is also necessary for moving
Android over to SkDiscardablePixelRef from SkImageRef in a later CL.
Added a test for this.

SkDecodingImageGenerator::Install can optionally pass a factory in to
SkDiscardablePixelRef.

Removed SkImageCache, SkLruImageCache, and SkPurgeableImageCache.
This functionality can be handled much more cleanly by
SkDiscardableMemory.

New SkDiscardableMemoryPool class to replace SkLruImageCache.  In a
later CL, we will replace SkImageRef_GlobalPool (used by android) as
well.  This is a concrete implementation of
SkDiscardableMemory::Factory.  Added a test for this.

modified gm/factory.cpp to remove dependnce on SkBitmapFactory +
SkLruImageCache.  Now uses SkDecodingImageGenerator +
SkDiscardablePixelRef + SkDiscardableMemoryPool.

SkImageDecoder::Target replaces SkBitmapFactory::Target.  The
DecodeMemoryToTarget function may disappear in the future.

Moved SkLazyCachingPixelRef::DecodeProc replaces
SkBitmapFactory::DecodeProc.  This is a short term change, since
another CL changes SkLazyCachingPixelRef to use SkImageGenerator
instead of DecodeProc.

Modified DrawBitmapRectTest to use SkDiscardablePixelRef instead of
SkLazyPixelRef.

tools/LazyDecodeBitmap.cpp now uses SkDecodingImageGenerator +
SkDiscardablePixelRef instead of a SkBitmapFactory.

bench_pictures uses the Global SkDiscardableMemoryPool instead of a
global gLruImageCache.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12515 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-05 18:31:42 +00:00
robertphillips@google.com
ea4f3dbcf1 Add Windows compilation support to V8 example
https://codereview.chromium.org/106163004/



git-svn-id: http://skia.googlecode.com/svn/trunk@12508 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-05 15:55:00 +00:00
halcanary@google.com
36d08c5c90 SkCachingPixelRef to use SkImageGenerator
-   Remove SkLazyCachingPixelRef class.

-   Refactor unit tests.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12505 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-05 14:00:03 +00:00
commit-bot@chromium.org
44a3877442 V8 and Skia
R=robertphillips@google.com

Author: jcgregorio@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12503 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-05 13:45:19 +00:00
commit-bot@chromium.org
ab1c13864d Fix compilation with SK_ENABLE_INST_COUNT=1
Add INHERITED declarations to class declarations that prevent
compilation with the flag.

Remove SK_DEFINE_INST_COUNT from all class implementations.  Instead,
use function-local static variables in the reference count helper
classes to create the global instances to store the needed info. The
accessor functions are defined inline in the helper classes, so
definitions are not needed. The initialization point of the variables
should be as well defined as previously.

Remove SK_DECLARE_INST_COUNT_TEMPLATE and use SK_DECLARE_INST_COUNT
instead. This avoids possible future compilation errors further.

For SK_ENABLE_INST_COUNT=0 compilation, add an empty static member
function to all classes that use SK_DECLARE_INST_COUNT and
SK_DECLARE_INST_COUNT_ROOT macros. The function ensures that classes
contain public INHERITED typedef. This member function seems to be
compiled away. This shouĺd ensure that part of the compilation errors
are caught earlier.

Also adds DSK_DECLARE_INST_COUNT to few SkPDFDict subclasses.

R=robertphillips@google.com, richardlin@chromium.org, bsalomon@google.com

Author: kkinnunen@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12501 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-05 12:08:12 +00:00
senorblanco@chromium.org
1d62f42e21 Implement a NEON version of the RGBA gaussian blur. This shows a 9-15% speedup on Nexus-10.
R=mtklein@google.com, mtklein

before:
running bench [640 480]             blur_image_filter_large_10.00_10.00    8888: cmsecs =  33063.23
running bench [640 480]             blur_image_filter_small_10.00_10.00    8888: cmsecs =  32800.25
running bench [640 480]               blur_image_filter_large_1.00_1.00    8888: cmsecs =  33017.88
running bench [640 480]               blur_image_filter_small_1.00_1.00    8888: cmsecs =  32743.35
running bench [640 480]               blur_image_filter_large_0.00_1.00    8888: cmsecs =  21024.04
running bench [640 480]              blur_image_filter_large_0.00_10.00    8888: cmsecs =  22904.15
running bench [640 480]               blur_image_filter_large_1.00_0.00    8888: cmsecs =  18738.08
running bench [640 480]              blur_image_filter_large_10.00_0.00    8888: cmsecs =  18798.98

after:
running bench [640 480]             blur_image_filter_large_10.00_10.00    8888: cmsecs =  30180.96
running bench [640 480]             blur_image_filter_small_10.00_10.00    8888: cmsecs =  29861.90
running bench [640 480]               blur_image_filter_large_1.00_1.00    8888: cmsecs =  30178.98
running bench [640 480]               blur_image_filter_small_1.00_1.00    8888: cmsecs =  29911.25
running bench [640 480]               blur_image_filter_large_0.00_1.00    8888: cmsecs =  19344.35
running bench [640 480]              blur_image_filter_large_0.00_10.00    8888: cmsecs =  19957.07
running bench [640 480]               blur_image_filter_large_1.00_0.00    8888: cmsecs =  17158.84
running bench [640 480]              blur_image_filter_large_10.00_0.00    8888: cmsecs =  17330.73

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12486 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-04 18:19:45 +00:00
commit-bot@chromium.org
1d02264b41 Remove cityhash.gyp
According to https://code.google.com/p/skia/issues/detail?id=1286 it should be fine to remove this empty gyp file now.

BUG=None
TEST=None
R=epoger@google.com

Author: tfarina@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12481 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-04 16:30:03 +00:00
commit-bot@chromium.org
55ca8244cc Refactor FourByteInterps. Add 64-bit Fast version. Add tests.
Effect on benches (only _fast_ should be affected, and only on 64-bit):

Desktop (64-bit)
four_byte_interp_slow_255 NONRENDERING c          7.80       7.84      -0.04    -0.5%
four_byte_interp_slow_256 NONRENDERING c          7.38       7.36      +0.02    +0.3%
four_byte_interp_fast_256 NONRENDERING c          4.86       4.38      +0.48    +9.9%
four_byte_interp_fast_255 NONRENDERING c          5.80       5.16      +0.64   +11.0%

N5 (32-bit)
four_byte_interp_slow_256 NONRENDERING c         22.22      22.66      -0.44    -2.0%
four_byte_interp_fast_255 NONRENDERING c         22.22      22.22      +0.00    +0.0%
four_byte_interp_fast_256 NONRENDERING c         18.81      18.81      +0.00    +0.0%
four_byte_interp_slow_255 NONRENDERING c         22.42      22.42      +0.00    +0.0%

BUG=
R=reed@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12468 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-03 18:53:30 +00:00
commit-bot@chromium.org
e3bb3bce3e Add JSON output option to bench.
A new command-line flag --outResultsFile takes the filename to write the JSON into.

The human readable output is the same as before with one exception. Previously DEBUG would be printed if in debug mode, or nothing would be printed if in release mode. Now this is reported as a named option:

  build=DEBUG

or

  build=RELEASE

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

Author: jcgregorio@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12465 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-03 18:16:48 +00:00
commit-bot@chromium.org
c25d2219cb Add four_byte_interp benches.
Desktop:
running bench [640 480] four_byte_interp_slow_256    NONRENDERING: cmsecs =      6.18
running bench [640 480] four_byte_interp_slow_255    NONRENDERING: cmsecs =      6.83
running bench [640 480] four_byte_interp_fast_256    NONRENDERING: cmsecs =      5.02
running bench [640 480] four_byte_interp_fast_255    NONRENDERING: cmsecs =      5.88

N5:
running bench [640 480] four_byte_interp_slow_256    NONRENDERING: cmsecs =     22.84
running bench [640 480] four_byte_interp_slow_255    NONRENDERING: cmsecs =     25.11
running bench [640 480] four_byte_interp_fast_256    NONRENDERING: cmsecs =     18.89
running bench [640 480] four_byte_interp_fast_255    NONRENDERING: cmsecs =     22.32

BUG=
R=reed@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12444 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-02 22:32:47 +00:00
commit-bot@chromium.org
611fde182a Remove the comments settings for vim tab width and expansion variables.
These add unnecessary bloat for everyone to carry around, so we just
remove them now.

The same change was made in chromium by Tony in
http://codereview.chromium.org/7310019 - crrev.com/92046

BUG=None
TEST=./gyp_skia
R=mtklein@google.com

Author: tfarina@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12443 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-02 22:23:03 +00:00
commit-bot@chromium.org
22528328fd Remove GR_IMPLEMENTATION define.
skgputest is built as a static library and thus this define is not
needed. If the library was built as shared, then this define would
be necessary and used. But it isn't, so we remove it now.

BUG=None
TEST=None
R=bsalomon@google.com

Author: tfarina@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12442 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-02 22:22:45 +00:00
scroggo@google.com
5092adc546 Separate and update PDF_DIFF_TRACE_IN_PNG
Move its functionality out of readToken() and into its own class.
Callers of the previous readToken() now call
SkPdfNativeTokenizer::readToken(), which in turn calls a function
for writing the diff to a file, if the caller requests it and
PDF_TRACE_DIFF_IN_PNG is defined.

Do not attempt to draw a diff for compatibility sections, which we
do not draw.

Use SkString to handle string manipulation.

Hide globals only used by PDF_TRACE_DIFF_IN_PNG behind that flag.

Remove hasVisualEffects, which always returns true.

Rename gLastOpKeyword to gOpCounter for clarity.

In SkPdfNativeTokenizer, set fEmpty to true when the entire stream
has been read.

Use SkBitmap::copyTo instead of manually copying an SkBitmap.

Builds on https://codereview.chromium.org/79933003/

R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12436 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-02 20:22:31 +00:00
scroggo@google.com
248647cebb Restructuring of PdfViewer code.
The only change in behavior is that SkPdfAllocator on SkPdfContext is
no longer allocated on the heap.

In general, I have just moved code.

SkPdfContext:
Inherit from SkNoncopyable.
Make SkPdfContext directly own fTmpPageAllocator. fTmpPageAllocator is
created when SkPdfContext is, and destroyed at the same time as well,
so there is no reason for the extra allocation.
Add the function parseStream. This eliminates code duplication, and
allows making fTmpPageAllocator private.
Move PdfMainLooper into the implementation file, since it is now only
used by parseStream.
Move SkTDictWithDefaultConstructor and render stats info here, in
support of PdfMainLooper.

SkPdfTokenLooper:
Rename PdfTokenLooper to SkPdfTokenLooper.
Move readToken here, unchanged.
Remove tokenizer(), which is unused.

SkPdfNativeDoc:
Remove tokenizerOfPage and tokenizerOfBuffer, which are unused.

SkPdfOps:
Move gPdfOps and PdfOperatorRenderer into a header file (hidden for
now), so they can be accessed by both SkPdfRenderer.cpp and
SkPdfContext.cpp.

SkPdfRenderer:
Harvest things into other files:
PdfMainLooper (and the code that calls it) -> SkPdfContext.
readToken -> SkPdfTokenLooper.

R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12435 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-02 20:18:09 +00:00
bungeman@google.com
24339aa211 Libraries without '-l' treated as relative paths.
The following have the same effect on Windows:
'msvs_settings': { 'VCLinkerTool': { 'AdditionalDependencies': [ 'windowscodecs.lib', ],},},
'link_settings': {'libraries': ['-lwindowscodecs.lib',],},

But this one is different:
'link_settings': {'libraries': ['windowscodecs.lib',],},

since this last one will attempt to find the library at
third_party\skia\gyp\windowscodecs.lib
or a place like this, instead of looking in the library paths.

This also fixes capitalization of the affected libraries.

R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12434 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-02 19:54:33 +00:00
rmistry@google.com
d6bab02386 Reverting r12427
git-svn-id: http://skia.googlecode.com/svn/trunk@12428 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-02 13:50:38 +00:00
skia.committer@gmail.com
5b39f5ba9c Sanitizing source files in Housekeeper-Nightly
git-svn-id: http://skia.googlecode.com/svn/trunk@12427 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-02 13:36:22 +00:00
commit-bot@chromium.org
742058f0ca Speed up GrResourceCache lookup by inlining GrBinHashKey comparisons
The GCC compilers for Android and Ubuntu do not seem to be able to
inline the memcmp operations on GrBinHashKey data. Write the comparisons
manually. Also shortcut GrBinHashKey::EQ to skip comparison when hashes
do not match.

Speeds up grresourcecache_find test on ARM and x86_64. Speeds up
grresourcecache_add on x86_64.

In order to test the change, moves ad hoc Gr unit tests from
src/gr_unittest.cpp to tests/GrUnitTests to be consistent with other
tests and enables GrUnitTests.

Fixes a regression from r2863 with where re-setting GrBinHashKey data
would not set the hash correctly. This should also improve the hash
function itself. The regression caused many of the hash operations be
no-ops. This is caught by the unit test.

Renames the comparison functions that GrHashTable needs from EQ, LT to
Equals, LessThan.

Renames GrTBinHashKey to GrBinHashKey. The GrTBinHashKey used to
forward comparison functions to an ENTRY template class, which would
extract the key and call back to the GrTBinHashKey. This would save
the user from writing one comparison function when comparison was done
with int ENTRY::compare(). There's no real benefit in this now. Also
this was used only for one class (GrTextureStripAtlas). The other use
in GrResourceKey was not actually using the provided "shortcut". The
new GrBinHashKey is not templated with the entry, rather just provides
== and < functions. The users of GrTHashTable provide the needed
functions now.

Adds explicit documentation of functions that are actually needed
GrTHashTable for the Key template. Adds SK_DEBUG guards according to
the contract.

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

Author: kkinnunen@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12426 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-28 08:24:29 +00:00
commit-bot@chromium.org
dbe7f52412 ARM Skia NEON patches - 16/17 - Blitmask
Blitmask: NEON optimised version of the D32_A8 functions

    Here are the microbenchmark results I got for the D32_A8
    functions:

    Cortex-A9:
    ==========
    +-------+--------+--------+--------+
    | count | Black  | Opaque | Color  |
    +-------+--------+--------+--------+
    | 1     | -14%   | -39,5% | -37,5% |
    +-------+--------+--------+--------+
    | 2     | -3%    | -29,9% | -25%   |
    +-------+--------+--------+--------+
    | 4     | -11,3% | -22%   | -14,5% |
    +-------+--------+--------+--------+
    | 8     | +128%  | +66,6% | +105%  |
    +-------+--------+--------+--------+
    | 16    | +159%  | +102%  | +149%  |
    +-------+--------+--------+--------+
    | 64    | +189%  | +136%  | +189%  |
    +-------+--------+--------+--------+
    | 256   | +126%  | +102%  | +149%  |
    +-------+--------+--------+--------+
    | 1024  | +67,5% | +81,4% | +123%  |
    +-------+--------+--------+--------+

    Cortex-A15:
    ===========
    +-------+--------+--------+--------+
    | count | Black  | Opaque | Color  |
    +-------+--------+--------+--------+
    | 1     | -24%   | -46,5% | -37,5% |
    +-------+--------+--------+--------+
    | 2     | -18,5% | -35,5% | -28%   |
    +-------+--------+--------+--------+
    | 4     | -5,2%  | -17,5% | -15,5% |
    +-------+--------+--------+--------+
    | 8     | +72%   | +65,8% | +84,7% |
    +-------+--------+--------+--------+
    | 16    | +168%  | +117%  | +149%  |
    +-------+--------+--------+--------+
    | 64    | +165%  | +110%  | +145%  |
    +-------+--------+--------+--------+
    | 256   | +106%  | +99,6% | +141%  |
    +-------+--------+--------+--------+
    | 1024  | +93,7% | +94,7% | +130%  |
    +-------+--------+--------+--------+

    Blitmask: add NEON optimised PlatformBlitRowProcs16

    Here are the microbenchmark results (speedup vs. C code):

    +-------+-----------------+-----------------+
    |       |    Cortex-A9    |   Cortex-A15    |
    | count +--------+--------+--------+--------+
    |       | Blend  | Opaque | Blend  | Opaque |
    +-------+--------+--------+--------+--------+
    | 1     | -19,2% | -36,7% | -33,6% | -44,7% |
    +-------+--------+--------+--------+--------+
    | 2     | -12,6% | -27,8% | -39%   | -48%   |
    +-------+--------+--------+--------+--------+
    | 4     | -11,5% | -21,6% | -37,7% | -44,3% |
    +-------+--------+--------+--------+--------+
    | 8     | +141%  | +59,7% | +123%  | +48,7% |
    +-------+--------+--------+--------+--------+
    | 16    | +213%  | +119%  | +214%  | +121%  |
    +-------+--------+--------+--------+--------+
    | 64    | +212%  | +105%  | +242%  | +167%  |
    +-------+--------+--------+--------+--------+
    | 256   | +289%  | +167%  | +249%  | +207%  |
    +-------+--------+--------+--------+--------+
    | 1024  | +273%  | +169%  | +146%  | +220%  |
    +-------+--------+--------+--------+--------+

    Signed-off-by: Kévin PETIT <kevin.petit@arm.com>

BUG=
R=djsollen@google.com, mtklein@google.com, reed@google.com

Author: kevin.petit.arm@gmail.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12420 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-27 17:08:36 +00:00
commit-bot@chromium.org
361270e6b9 move to newer angle
R=robertphillips@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12416 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-27 15:43:22 +00:00
commit-bot@chromium.org
c09df2c32e Non-rect polygons are not covered in GM cases, such as triangle, trapezoid, diamond, polygons with lots of edges, concave polygons, etc, especially for stroke-style and stroke-and-fill style painters. So add a GM case to avoid potential rendering errors.
R=bsalomon@google.com, robertphillips@google.com

Author: yunchao.he@intel.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12413 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-27 01:24:53 +00:00
commit-bot@chromium.org
2e86551cf9 Fold bench source file list into bench.gyp.
It is one less file and doesn't make things much worse.

BUG=None
TEST=./gyp_skia
R=mtklein@google.com

Author: tfarina@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12412 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-27 00:44:03 +00:00
mtklein@google.com
09f2579109 DM: add --tileGrid
BUG=
R=epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12408 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-26 23:36:51 +00:00
senorblanco@chromium.org
d8f82a4c44 Enhance SkDropShadowImageFilter to support separate X & Y sigmas, and crop rect. This required a new flavour of the constructor.
This is driven by the feDropShadow filter effect in SVG, which unlike the shorthand version accepts separate X & Y sigmas.

Covered by new GM dropshadowimagefilter.

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12401 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-26 21:52:38 +00:00
mtklein@google.com
ee21a3e395 DM: some refactoring
- rename ComparisonTask to ChecksumTask
  - have ChecksumTask handle all the checksum-checking
  - turn on all extra modes by default
  - simplify progress output to a countdown

BUG=
R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12398 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-26 18:52:31 +00:00
commit-bot@chromium.org
11f392ed53 Revert "Revert "remove kA1_Config, as it is no longer supported""
This reverts commit 36d712f2d4c5c79719280ad95523e6aaa88b068e.

BUG=
R=rmistry@google.com, mtklein@google.com

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12392 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-26 12:51:57 +00:00
reed@google.com
72e7808d62 Revert "remove kA1_Config, as it is no longer supported"
This reverts commit 2d72d8b242eac6e9d30228f5b0a407236491c369.

git-svn-id: http://skia.googlecode.com/svn/trunk@12387 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-25 20:54:56 +00:00
commit-bot@chromium.org
4b413c8bb1 remove SkFloatToScalar macro
BUG=
R=reed@google.com, djsollen@google.com

Author: caryclark@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12385 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-25 19:44:07 +00:00
reed@google.com
2a1f4464d1 remove kA1_Config, as it is no longer supported
BUG=
R=djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12384 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-25 18:58:29 +00:00
commit-bot@chromium.org
866f4e34a9 optimize pathops coverage
Remove unused code from SkOpSegment.cpp and friends.
Add new tests exposed by coverage.
Fix a bug exposed by coverage -- removing the need to detect points that are nearby when intersecting.
Add gyp rule for building coverage flavor on Mac.

R=mtklein@google.com

Author: caryclark@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12344 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-21 17:04:29 +00:00
halcanary@google.com
ad04eb49f5 Add SkImageGenerator Interface
-   Add SkDiscardablePixelRef class that uses SkDiscardableMemory and
    a SkImageGenerator.

-   Add SkDecodingImageGenerator class as an example of a
    SkImageGenerator.

-   Add DecodingImageGenerator unit test.

-   Add SkBasicDiscardableMemory implmentation for unit tests only.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12341 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-21 15:32:08 +00:00
commit-bot@chromium.org
644629c1c7 Implement a benchmark for GrResourceCache
Adds "grresourcecache_add" and "grresourcecache_find" bench tests to test
GrResourceCache::add and GrResourceCache::find. The tests work only
with GPU backends, since GrResourceCache needs an GrGpu.

Modifies bench tests to override SkBenchmark::isSuitableFor(Backend)
function that specifies what kind of backend the test is inteded
for. This replaces the previous "fIsRendering" flag that would
indicate test that did no rendering.

Adds SkCanvas::getGrContext() call to get the GrContext that the
canvas ends up drawing to. The member function solves a common
use-case that is also used in the benchmark added here.

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

Author: kkinnunen@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12334 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-21 06:21:58 +00:00
scroggo@google.com
bf6426120a Move PdfTokenLooper into its own file.
Otherwise, leave the class unchanged.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12333 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 23:12:25 +00:00
scroggo@google.com
d906702f78 Move SkPdfContext into its own files.
Otherwise, the class is unchanged.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12330 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 22:33:39 +00:00
scroggo@google.com
7d8013f306 Changes to SkTDStackNester.
SkTDStackNester is a class used by PdfViewer to assist in saving
and restoring the PDF state. Clean up and test this class.

Add some documentation.

Add FIXME's where I have questions to resolve.

Fix a bug where fNestingLevel was not initialized.

Remove a commented out line of code copied over from
SkTDStack.

Rename SkTDStackNester::nests() to nestingLevel() and make it const.

Remove unnecessary predeclaration and friend declaration.

Remove index() (both const and non-const versions). They were
unused, return something that may not be expected (index from
the top, rather than from the bottom), and don't work to get any
elements in earlier Recs once the first one is full.

Report a warning if the nesting level goes above the maximum level,
or if we attempt to bring it below zero.

Prevent fNestingLevel from dropping below zero.

Add kUnusedObject_SkPdfIssue, and use it where appropriate.

Depends on https://codereview.chromium.org/64093009/

R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12328 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 21:40:57 +00:00
scroggo@google.com
0daf00ccd7 Move SkTDStackNester into its own private file.
Also remove depth(), which is unused.

Otherwise the class is unchanged.

R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12324 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 20:47:21 +00:00
mtklein@google.com
dad7070d91 More common_conditions simplifications.
BUG=
R=bungeman@google.com, djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12322 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 18:06:10 +00:00
mtklein@google.com
f1077f9164 Add extra warnings to match what Android uses.
R=mtklein@google.com

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12314 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 15:13:49 +00:00
scroggo@google.com
b60cdc8f4c Revert "Add extra warnings to match what Android uses."
This reverts commit d234662df1ffeb1bf45b2ade16c4acfb94f89450.

This change broke the build. Will resubmit after fixing warnings.

git-svn-id: http://skia.googlecode.com/svn/trunk@12311 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 13:58:58 +00:00
djsollen@google.com
692f88c7f0 Add extra warnings to match what Android uses.
R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12310 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-20 13:16:47 +00:00
scroggo@google.com
909228992c Pdfviewer refactoring.
Mostly superficial changes, to help me make sure I understand the
code while making modifications.

SkPdfRenderer:
First class I'm modifying. Move it into include/ and src/ directories.
Inherit from SkNoncopyable.
Replace load() with factory function which returns NULL if the load
fails.
Remove unload() and loaded(), which no longer make sense, since the
factory will return NULL on a failure to load, and unload() happens
on destruction.
Use a const char* for loading a PDF, following the convention of
SkStream::NewFromFile.
Remove unnecessary call to sqrt in SkPDFNativeRenderToBitmap.
Also in SkPDFNativeRenderToBitmap, use an appropriate SkScalar macro
to convert to an integer.
Use this-> when calling member functions.

pdf_viewer_main.cpp:
Call the new interface for SkPdfRenderer.

gyp files:
Refer to the new location of SkPdfRenderer.

R=edisonn@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12296 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-14 19:09:27 +00:00
scroggo@google.com
e917962f6e Include pdfviewer in everything.
This simplifies the process for building pdfviewer. Now it can be
built using

./gyp_skia

make pdfviewer

(ninja can also be used).

R=edisonn@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12288 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-14 15:46:25 +00:00
reed@google.com
3443fd8886 move SkImageInfo into its own header
BUG=
R=djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12273 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-13 19:09:13 +00:00
djsollen@google.com
efc51b79a2 fix multithread related crashes in skpdiff
BUG=skia:1798
R=mtklein@google.com, scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12252 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-12 18:29:17 +00:00
commit-bot@chromium.org
23a9121961 pdfviewer: compile pdfviewer in gm, only if the flag is set (currently we compile pdfviewer, even if it is not used)
R=scroggo@google.com, jvanverth@google.com

Author: edisonn@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12249 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-12 17:44:28 +00:00
jvanverth@google.com
d830d13c27 Hook in rough distance field support for fonts
R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12229 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-11 20:54:09 +00:00
bungeman@google.com
451b5962c9 Android FontHost cannot use FontMgr yet.
git-svn-id: http://skia.googlecode.com/svn/trunk@12221 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-11 18:36:46 +00:00
senorblanco@chromium.org
f376f5de93 Implement a NEON version of morphology. This is good for ~2.2X speedup on Tegra3.
R=mtklein@google.com, mtklein, reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12219 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-11 16:48:51 +00:00
bungeman@google.com
b3d154de5e Remove SK_FONTHOST_USES_FONTMGR.
Review URL: https://codereview.chromium.org/66783003

git-svn-id: http://skia.googlecode.com/svn/trunk@12217 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-11 15:53:29 +00:00
commit-bot@chromium.org
ffd178c84d Initial draft code to run pdfviewer withg gms
draft cl to run pdfviewer with gms 	modified:   gm/gmmain.cpp 	modified:   gyp/gm.gyp 	modified:   src/utils/SkPDFRasterizer.cpp 	modified:   src/utils/SkPDFRasterizer.h

R=scroggo@google.com, borenet@google.com

Author: edisonn@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12214 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-11 15:10:47 +00:00
commit-bot@chromium.org
5916705587 add GM case nonclosedpaths. The 2 bugs below showed some non-closed paths which are easy to get wrong rendering results. So add a GM case for this kind paths to avoid potential bugs to be introduced.
BUG=skia:1782
BUG=skia:1811
R=bsalomon@google.com, caryclark@google.com, reed@google.com, robertphillips@google.com

Author: yunchao.he@intel.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12206 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-09 01:37:30 +00:00
senorblanco@chromium.org
27eec46d69 SSE2 implementation of RGBA box blurs. This yields ~2X perf improvement on Xeon ES-2690.
R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12204 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-08 20:49:04 +00:00
commit-bot@chromium.org
9901727f21 Fix stale assert in GrDrawTarget::print
Fix stale assert in GrDrawTarget::print.

R=bsalomon@google.com

Author: kkinnunen@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12201 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-08 18:45:27 +00:00
robertphillips@google.com
96ac2f693b Add GM to verify removal of 32767 limit in SkBlurMaskFilter::filterRectsToNine is okay
https://codereview.chromium.org/60513013/



git-svn-id: http://skia.googlecode.com/svn/trunk@12181 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-07 22:25:21 +00:00
reed@google.com
126f7f5244 Revert "Revert "speed up A8 by creating a new entry-point in SkDraw that blits the path's coverage directly into an A8 target, regardless of the previous pixel values.""
This reverts commit 3c77887b3eb2d32ab668ab4e5f2f9e79103956e8.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12167 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-07 16:06:53 +00:00
halcanary@google.com
1f0121af49 New SkRTConf macro SK_CONF_TRY_SET: no complaint on missing configuration
SK_CONF_TRY_SET() is like SK_CONF_SET(), but doesn't complain if
confname can't be found.  This is useful if the SK_CONF_DECLARE is
inside a source file whose linkage is dependent on the system.

Internally to the SkRTConf system, SkRTConfRegistry::set() was given
an additional parameter controling wanrings.

A new RuntimeConfig unit test was introduced.  It should run silently.
In the future, it should be expanded to cover all of the SkRTConf
functionality.

(For example, the images.jpeg.suppressDecoderWarnings variable is
defined and used only in SkImageDecoder_libjpeg.cpp, but on MacOS, we
use Core Graphics via SkImageDecoder_CG.cpp - SkImageDecoder_libjpeg
is never linked in.  The same is true of the Windows Imaging Component
on Windows.)

BUG=
R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12155 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-06 15:07:44 +00:00
commit-bot@chromium.org
6e3e42296b Break up SkLazyPixelRef functionally into class hierarchy.
The reason for this CL is to allow greater decoder flexibility.
Chrome currently uses its own decoding functions.  These allow for
greater flexibility in dealing with images with multiple frames or
partial data.  The DecodeProc function was not flexible enough to
handle these.  Instead of asking the decoder to squeeze everything
into the DecodeProc, we now ask the downstream library to inherit from
SkCachingPixelRef.  If WebKit's LazyDecodingPixelRef is re-tooled to
inherit from SkCachingPixelRef, then it can make use of Skia's caching
ability while still allowing it to deal with multiple frames, scaling,
subsetting, and partial data.

-   The abstract SkCachingPixelRef class handles caching the decoded
    data in a SkScaledImageCache.  This class relies on the virtual
    functions onDecodeInfo() and onDecode() to do the actual decoding
    of data.

-   The SkLazyCachingPixelRef class is derived from SkCachingPixelRef.
    It provides an implementation of onDecodeInfo() and onDecode() in
    terms of calls to a SkBitmapFactory::DecodeProc function.  It also
    provides an Install() static method which installs a new
    SkLazyCachingPixelRef into a SkBitmap.

SkLazyCachingPixelRef exists for two reasons: to test
SkCachingPixelRef within Skia and as an example for downstream
developers to make their own classes that inherit from
SkCachingPixelRef.

-   The CachedDecodingPixelRefTest was updated to test the
    SkLazyCachingPixelRef class and indirectly the SkCachingPixelRef
    class.

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

Author: halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12149 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-06 10:08:30 +00:00
scroggo@google.com
7b05659072 Add gms and benchmarks for drawing blurry round rects.
Further changes (https://codereview.chromium.org/48623006) will change
the speed at which the bench draws and the drawing of the gm (the gm
change is small).

One of these round rects causes slow drawing in a webpage that we have
observed.

BUG=https://b.corp.google.com/issue?id=11174385

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12133 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-05 15:57:21 +00:00
reed@google.com
84e922bfb3 Revert "speed up A8 by creating a new entry-point in SkDraw that blits the path's coverage directly into an A8 target, regardless of the previous pixel values."
This reverts commit d615e839b71f75df895de6850b774a9e1c28ad2a.

Revert "must initialize SkDraw.fClip"

This reverts commit 108e46d29b5f57927fc8b8c403bb52019d8cb16d.

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12122 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-04 20:57:36 +00:00
reed@google.com
ac9d306a92 speed up A8 by creating a new entry-point in SkDraw that blits the path's coverage directly into an A8 target, regardless of the previous pixel values.
R=bsalomon@google.com, mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12118 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-04 20:10:33 +00:00
caryclark@google.com
a2bbc6e19d pathops work in progress
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12089 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-01 17:36:03 +00:00
commit-bot@chromium.org
0251288112 Adding size parameter to read array functions
In some cases, the allocated array into which the data will be read is using getArrayCount() to allocate itself, which should be safe, but some cases use fixed length arrays or compute the array size before reading, which could overflow if the stream is compromised.

To prevent that from happening, I added a check that will verify that the number of bytes to read will not exceed the capacity of the input buffer argument passed to all the read...Array() functions.

I chose to use the byte array for this initial version, so that "size" represents the same value across all read...Array() functions, but I could also use the element count, if it is preferred.

Note : readPointArray and writePointArray are unused, so I could also remove them

BUG=
R=reed@google.com, mtklein@google.com, senorblanco@chromium.org

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12058 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-31 18:37:50 +00:00
senorblanco@chromium.org
1986756c06 Speculative Android build fix.
TBR=robertphillips

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12041 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-30 22:38:15 +00:00
senorblanco@chromium.org
7a47ad3bac Implement SSE2-based implementations of the morphology filters (dilate & erode). This gives a 3-5X speedup over the naive implementation, and also mitigates a timing-based security attack in Chrome (https://code.google.com/p/chromium/issues/detail?id=251711).
NOTE: this will require a corresponding GYP change on the Skia roll into Chrome: https://codereview.chromium.org/52453004/

R=mtklein@google.com, reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12038 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-30 21:57:04 +00:00
robertphillips@google.com
4e5559af89 Allow specifying the max texture count on the bots
https://codereview.chromium.org/50413011/



git-svn-id: http://skia.googlecode.com/svn/trunk@12020 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-30 17:04:16 +00:00
commit-bot@chromium.org
7585479202 Allow SkLazyPixelRef to use SkScaledImageCache
-   SkScaledImageCache:
    -   Add new FindAndLock/AddAndLock variants that work well with
        SkLazyPixelRefs (take width, height, generation_id).
    -   Add static versions of these new variants.

-   SkLazyPixelRef:
    -   If NULL passed in as SkImageCache* in the constructor, it will
        now default to using the static SkScaledImageCache methods to
        cache decoded images.
    -   If (fImageCache==NULL), the default allocator can be changed
        with the setAllocator method.  If (fImageCache!=NULL), the
        SkImageCache handles allocation.

-   CachedDecodingPixelRefTest to test the new functionality.

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

Author: halcanary@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12006 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-29 19:55:00 +00:00
commit-bot@chromium.org
ea7e69a52e A fix for annoying clang error "unused-const-variabl" in third_party code.
../../third_party/externals/libwebp/src/enc/quant.c:105:23: error: unused variable 'kCoeffThresh' [-Werror,-Wunused-const-variable]
static const uint16_t kCoeffThresh[16] = {
                              ^
                      1 error generated.

BUG=None
TEST=build with clang, ninja -C out/Debug most.
R=bsalomon@google.com, epoger@google.com, thakis@chromium.org, mtklein@google.com

Author: tfarina@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11990 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-28 22:05:12 +00:00
commit-bot@chromium.org
2d3a7897e5 DM: add --pipe
internal_links is failing across all three versions.  One of the rects doesn't draw.

BUG=
R=epoger@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11985 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-28 19:51:26 +00:00
commit-bot@chromium.org
5003bde3f8 Factor out skia_keep_frame_pointer. Handy with perf to get call stacks.
Today it's set when we're running a sanitizer, but it's more generally useful.  perf record -g (--call-graph) only works for me if we don't omit the frame pointer.

BUG=
R=bungeman@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11966 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-25 18:14:54 +00:00
commit-bot@chromium.org
50a3043194 We want to give SkPixelRef a way to signal over to GrResourceCache that it's become pointless to keep around textures based on that SkPixelRef when its pixels change, so that it can be a good citizen and free those textures.
This adds an invalidation listener mechanism to SkPixelRef to let it send this message while still staying ignorant of who's listening.

These messages are tricky to deliver.  The SkPixelRefs they originates from and the GrResourceCaches they ultimately end up at may be on different threads; neither class is threadsafe; their object lifetimes are totally independent; it's a many-senders-to-many-receivers relation; and neither codebase should really know about the other.

So I've added a per-message-type global message bus to broadcast messages to threadsafe inboxes.  Anyone can post() a message, which will show up in all the inboxes of that type, read whenever the inbox's owner calls poll().  The implementation is _dumb_; it can be improved in several dimensions (inbox size limits, lock-free message delivery) if we find the need.

I took some care to make sure not to send the invalidation message for any SkPixelRef that's sharing a generation ID with another SkPixelRef.

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

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11949 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-24 17:44:27 +00:00
vandebo@chromium.org
ece95c32d5 [PDF] Add unpremultiply support and a GM (try5)
This is a resubmit of https://codereview.chromium.org/22831039 which was
reverted because it causes issues on Windows.

BUG=chromium:175548
R=edisonn@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11945 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-24 15:20:00 +00:00
vandebo@chromium.org
ccf6b91a54 Revert "[PDF] Add unpremultiply support and a GM (try4)"
This reverts commit r11928

gm seems to crash on windows.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11931 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-23 21:36:43 +00:00
vandebo@chromium.org
e66d376067 [PDF] Add unpremultiply support and a GM (try4)
This is a resubmit of https://codereview.chromium.org/22831039 which was
reverted because it causes issues on Windows (really, release builds).

BUG=chromium:175548
R=edisonn@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11928 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-23 20:17:29 +00:00
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
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
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
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
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
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
mtklein@google.com
a7a9f37a31 DM: add --writePath
For fun, make the output prettier, hiding ", N failures" unless there is one.

BUG=
R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11867 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-18 20:52:44 +00:00
vandebo@chromium.org
59fd223870 [PDF] Add unpremultiply support and a GM (try3).
This is a resubmit of https://codereview.chromium.org/22831039 which was
reverted because it causes issues on Windows.

BUG=chromium:175548
R=edisonn@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11866 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-18 20:18:29 +00:00
vandebo@chromium.org
ce60c1fc5d Revert "[PDF] Add unpremultiply support and a GM."
This reverts commit f746273b8ba282f548a6eaffb45b11b6f468aa8e.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11858 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-18 16:10:03 +00:00
vandebo@chromium.org
c4d17716cd [PDF] Add unpremultiply support and a GM.
This is a resubmit of https://codereview.chromium.org/22831039 which was
reverted because it causes issues on Windows.

BUG=chromium:175548
R=edisonn@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11857 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-18 15:53:03 +00:00
commit-bot@chromium.org
cd7992ba55 ARM Skia NEON patches - 30 - Xfermode: NEON modeprocs
Xfermode: NEON implementation of SIMD procs

This patch contains a NEON implementation for a number of Xfermodes.
It provides a big speedup on Xfermode benchmarks (currently up to 3x
with gcc4.7 but up to 10x when gcc produces optimal code for it).

Signed-off-by: Kévin PETIT <kevin.petit@arm.com>

BUG=

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

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

R=djsollen@google.com, mtklein@google.com, reed@google.com, robertphillips@google.com

Author: kevin.petit.arm@gmail.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11843 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-17 16:29:34 +00:00
robertphillips@google.com
dfe0f43e11 Reverting r11813 (ARM Skia NEON patches - 30 - Xfermode: NEON modeprocs - https://codereview.chromium.org/26627004) due to Chromium compilation faliures.
git-svn-id: http://skia.googlecode.com/svn/trunk@11833 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-17 00:09:17 +00:00
commit-bot@chromium.org
846872f75b Fix DM build failures:
- forgot tool_main;
  - skip building where skia_gpu is false;
  - lots of scalar -> int warnings;
  - stray return on a void method;
  - stifle warning about a uint32_t cast to bool

BUG=
R=bungeman@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11821 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-16 18:21:03 +00:00
jvanverth@google.com
c7a40fad0b Split out GrBitmapTextContext from GrTextContext.
This is a stepping stone to having a variety of different text context types
(bitmaps, distance fields, NV path rendering).

R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11820 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-16 18:15:34 +00:00
commit-bot@chromium.org
8f930ff33e Remove unused header SkImageTypes.h
R=reed@google.com

Author: tfarina@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11815 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-16 17:02:28 +00:00
commit-bot@chromium.org
b4c29c5363 ARM Skia NEON patches - 30 - Xfermode: NEON modeprocs
Xfermode: NEON implementation of SIMD procs

This patch contains a NEON implementation for a number of Xfermodes.
It provides a big speedup on Xfermode benchmarks (currently up to 3x
with gcc4.7 but up to 10x when gcc produces optimal code for it).

Signed-off-by: Kévin PETIT <kevin.petit@arm.com>

BUG=

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

R=djsollen@google.com, mtklein@google.com, reed@google.com, robertphillips@google.com

Author: kevin.petit.arm@gmail.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11813 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-16 16:24:08 +00:00
commit-bot@chromium.org
6397217b30 detach blur result texture when it is the same texture used to render path mask
R=robertphillips@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11805 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-16 13:53:54 +00:00
mtklein@google.com
6001ee3a34 remove dm from everything
git-svn-id: http://skia.googlecode.com/svn/trunk@11804 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-16 13:18:43 +00:00
mtklein@google.com
d36522d12d dm is like gm, but faster and with fewer features.
This is sort of the near-minimal proof-of-concept skeleton.

  - It can run existing GMs.
  - It supports most configs (just not PDF).
  - --replay is the only "fancy" feature it currently supports

Hopefully you will be disturbed by its speed.

BUG=
R=epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11802 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-16 13:02:15 +00:00
robertphillips@google.com
f8dd38424c Reverting r11777 (ARM Skia NEON patches - 30 - Xfermode: NEON modeprocs) due to Chromium compilation failure
git-svn-id: http://skia.googlecode.com/svn/trunk@11799 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-16 01:12:38 +00:00
commit-bot@chromium.org
a46128ee54 Remove obsolete CityHash conditional.
BUG=
R=bungeman@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11785 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-15 20:03:59 +00:00
commit-bot@chromium.org
baa15581f6 ARM Skia NEON patches - 30 - Xfermode: NEON modeprocs
Xfermode: NEON implementation of SIMD procs

This patch contains a NEON implementation for a number of Xfermodes.
It provides a big speedup on Xfermode benchmarks (currently up to 3x
with gcc4.7 but up to 10x when gcc produces optimal code for it).

Signed-off-by: Kévin PETIT <kevin.petit@arm.com>

BUG=
R=djsollen@google.com, mtklein@google.com, reed@google.com

Author: kevin.petit.arm@gmail.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11777 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-15 16:18:40 +00:00
reed@google.com
4979f32cd3 remove SkDataSet, and just store a key/value in SkAnnotation
BUG=
R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11759 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-14 16:49:15 +00:00
commit-bot@chromium.org
5e00989a28 Add SkPDFDeviceFlatenner which extends SkPDFDevice to add support to flatten the path and the text when we have perspective.
prepare to deprecate SkPDFDevice constructor, and route gm and render_pdfs to use SkDocument::Create pdf interface instead. - controlled by a flag
add comments where we are supposed to flatten other features (paint, shaders, ... )

R=reed@google.com, bungeman@google.com, scroggo@google.com, vandebo@chromium.org, bsalomon@google.com

Author: edisonn@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11751 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-14 13:42:12 +00:00
commit-bot@chromium.org
1108fc3058 Remove SkLumaXfermode.
Possibly the shortest-lived Skia feature, SkLumaXfermode is now replaced
by a color filter implementation (SkLumaColorFilter). All known existing
clients (Blink) have been converted.

R=reed@google.com

Author: fmalita@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11750 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-14 13:11:11 +00:00
bungeman@google.com
fab44db294 Clean up SkTypes.h.
This change removes sk_stdint.h since it is only needed for vs2008 and earlier.
This change removes SK_MMAP_SUPPORT define since it is no longer used.
This change removes the stdio.h include from SkTypes.h since on many systems
this is a very large header, few Skia files actually use it, it is
available everywhere standard, and SkDebugf should be used instead.

After this change there is no need for external users to put Skia's
include/config into their own list of includes, saving the headache
of having two header files of the same name and sometimes getting the
wrong one depending on include order.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11738 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-11 18:50: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
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
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
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
mtklein@google.com
3a19fb58a6 Sketch of SK_ONCE
BUG=
R=bungeman@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11674 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-09 16:12:23 +00:00
commit-bot@chromium.org
7d14ceff7b Add new GM to stress test the GPU font cache for cases similar to
Chromium issue 303803.

BUG=303803
R=robertphillips@google.com

Author: jvanverth@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11673 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-09 16:00:42 +00:00
commit-bot@chromium.org
df187c7eb2 ARM Skia NEON patches - 28 - Xfermode: SIMD modeprocs
Xfermode: allow for SIMD modeprocs

    This patch introduces the ability to have SIMD Xfermode modeprocs.
    In the NEON implementation, SIMD modeprocs will process 8 pixels
    at a time.

    Signed-off-by: Kévin PETIT <kevin.petit@arm.com>

BUG=

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

R=djsollen@google.com, mtklein@google.com, reed@google.com

Author: kevin.petit.arm@gmail.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11669 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-09 14:39:46 +00:00
djsollen@google.com
6f980c6a23 Revert "ARM Skia NEON patches - 28 - Xfermode: SIMD modeprocs"
This reverts http://code.google.com/p/skia/source/detail?r=11654

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11655 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-08 16:59:53 +00:00
commit-bot@chromium.org
84cc1ebc5a ARM Skia NEON patches - 28 - Xfermode: SIMD modeprocs
Xfermode: allow for SIMD modeprocs

    This patch introduces the ability to have SIMD Xfermode modeprocs.
    In the NEON implementation, SIMD modeprocs will process 8 pixels
    at a time.

    Signed-off-by: Kévin PETIT <kevin.petit@arm.com>

BUG=
R=djsollen@google.com, mtklein@google.com, reed@google.com

Author: kevin.petit.arm@gmail.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11654 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-08 16:47:22 +00:00
mtklein@google.com
9f3b0e462e skia/trunk changes for generic sanitizer gyp flag.
BUG=
R=borenet@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11648 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-08 15:16:36 +00:00
commit-bot@chromium.org
6c1ee2d4e7 Luminance-to-alpha color filter (SkLumaColorFilter).
Adding a color filter luma implementation. The plan is to convert
existing clients and then deprecate SkLumaXfermode.

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

Author: fmalita@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11636 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-07 18:00:17 +00:00
commit-bot@chromium.org
261dc569b6 Move VertexBuilder to a GrGLFullShaderBuilder subclass
Removes the VertexBuilder nested class from GrGLShaderBuilder in favor
of a new GrGLFullShaderBuilder subclass, and adds an optional emitCode
overload to GrGLEffect that takes a GrGLFullShaderBuilder. Makes
setData virtual in GrGLEffectArray and adds a GrGLVertexEffectArray
subclass that gets built using a GrGLFullShaderBuilder. Also adds a
new GrGLVertexEffect subclass that makes the GrGLFullShaderBuilder
overload required for emitCode, and updates GrGLEffects to inherit
from GrGLVertexEffect where needed.

R=bsalomon@google.com

Author: cdalton@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11612 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-04 15:42:56 +00:00
halcanary@google.com
fed3037217 Make image decoding more fault resistant, less verbose.
This change address what happens when a jpeg is partially downloaded
before failing.  Many browsers will render it anyway: we want Skia to
do the same.  The JpegTest takes a perfectly cromulent jpeg file and
only passes into the ImageDecoder the first half of the image.  We
then verify that the image decoder returns a valid bitmap of the
correct dimensions.

We also fixed some png library errors, including issue 1691.

Also, suppressed the majority of warnings from using libpng and
libjpeg.  By default, most warnings are *not* suppressed in debug mode.
If you have a debug binary and wish to suppress warnings, set the
following environment variables to true
    skia_images_png_suppressDecoderWarnings
    skia_images_jpeg_suppressDecoderWarnings
or from within a program that links to Skia:
    #if defined(SK_DEBUG)
    #include "SkRTConf.h"
    SK_CONF_SET("images.jpeg.suppressDecoderWarnings", true);
    SK_CONF_SET("images.png.suppressDecoderWarnings", true);
    #endif

I tested this, before (control) and after these changes (test), on
364,295 skps from the cluster telemetry.
-   number of errors+warnings in control = 2804
-   number of errors+warnings fixed = 2283
-   number of PNG verbosity fixed =  2152
-   number of PNG error fixed = 4
-   number of PNG segfault fixed = 3
-   number of PNG errors changed to warnings = 62
-   number of JPG verbosity fixed =  26
-   number of JPG error fixed = 91
Not all errors and warning have been fixed.

These numbers were generated using the find_bad_images_in_skps.py
program.  This program may be useful going forward for testing
image-decoding libraries on skp files from the cluster telemetry.
find_bad_images_in_skps.py depends on the test_image_decoder program,
which simply executes the SkImageDecoder::DecodeFile function and uses
its exit status to report success or failure.

BUG=skia:1649
BUG=skia:1691
BUG=skia:1680
R=scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11597 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-04 12:46:45 +00:00
commit-bot@chromium.org
3390b9ac9a Repurpose GrGLCoordTransform as GrGLProgramEffects
Creates a GrGLProgramEffects class that the GrGLProgram uses to manage
an array of effects. This gives us enough abstraction for the program
to cleanly handle different types of coord transforms.

R=bsalomon@google.com

Author: cdalton@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11588 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-03 15:17:58 +00:00
djsollen@google.com
5df5e6126d Update PDF backend to support fallback fonts on Android.
R=edisonn@google.com, reed@google.com, vandebo@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11586 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-03 14:42:24 +00:00
commit-bot@chromium.org
09846a05be Add new skyline Rectanizer
The skyline Rectanizer tracks the leading silhouette of the
currently packed rects and tries to fit the next rectangle
on top of that. This gives slightly better packing behavior
than the current log2 scheme.

Also shrank the size of the plots, which increases their
number from 18 to 32 and gives better cache behavior (fewer
purges and uploads).

R=bsalomon@google.com

Author: jvanverth@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11577 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-02 17:37:59 +00:00
bsalomon@google.com
ea1abfcab6 Fix gpu.gypi missing file issue
git-svn-id: http://skia.googlecode.com/svn/trunk@11571 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-02 15:02:55 +00:00
caryclark@google.com
7eaa53d8f7 path ops work in progress
make more skps work

remove edit files

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11570 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-02 14:49:34 +00:00
bsalomon@google.com
77af6805e5 Make GPU coord transforms automatic
Adds a GrCoordTransform class and updates the framework to handle
coord transforms similar to how it handles textures with
GrTextureAccess. Renames GrGLEffectMatrix to GrGLCoordTransform and
slightly repurposes it to be used by the framework instead of effects.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11569 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-10-02 13:04:56 +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
scroggo@google.com
83fd2c7c43 Add a buffered SkStream class.
This is used by Android to buffer an input stream which may not
otherwise be able to rewind.

Add a test for the new class.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11488 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-26 21:35:39 +00:00
reed@google.com
939ca7ce86 move GrMalloc, GrFree, Gr_bzero to their sk equivalents
BUG=
R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11486 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-26 19:56:51 +00:00
reed@google.com
baed71fbfe add counting to Globals, and refactor some for clarity
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11484 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-26 19:28:27 +00:00
commit-bot@chromium.org
1a4fb70c8a Moving 4 SkImageFilter derived classes from blink to skia
There were 4 classes in blink that derived from SkImageFilter :
- TileImageFilter -> SkTileImageFilter
- OffsetImageFilter -> SkOffsetImageFilter (already existed)
- FloodImageFilter -> SkFloodImageFilter
- CompositeImageFilter -> SkCompositeImageFilter

All functions were copied as is, without modification (except for warnings fixes), except for the offset filter, which was merged into the existing SkOffsetImageFilter class, as a special case when a crop rect is provided. Since the names won't clash with the names in blink, it should be easy to integrate them in blink later and fix issues, if needed.

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

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11475 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-26 16:09:28 +00:00
commit-bot@chromium.org
97f8167622 We don't flatten or unflatten SkPaintOptionsAndroid. Reproduce and fix.
BUG=skia:1625
R=djsollen@google.com, reed@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11472 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-26 15:16:12 +00:00
robertphillips@google.com
ca0c8389e2 Move bound and isFinite into pathref
https://codereview.chromium.org/24350006/



git-svn-id: http://skia.googlecode.com/svn/trunk@11467 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-26 12:18:23 +00:00
bungeman@google.com
1435f9f29a Add skia_tsan_build to match skia_asan_build and fix one example race.
R=mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11464 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-25 22:39:22 +00:00
scroggo@google.com
111fd11e11 Bench baseline for mostly 0 image.
Add a baseline for decoding a mostly 0 image. This is in advance of
https://codereview.chromium.org/24269006/ which provides an option to
skip writing those 0s (as part of BUG=skia:1661). On my Nexus 4, the
benchmark does not slow down after that change.

As suggested in https://codereview.chromium.org/24269006/ add a
resourcePath flag to bench. Will require a change in buildbot in order
to actually use the flag.

Add an image used by the test.

Until https://codereview.chromium.org/24448002 is submitted,
the test will not actually be run by the bots (since it
won't know where to find the file).

BUG=skia:1661
R=djsollen@google.com, mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11461 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-25 21:42:12 +00:00
commit-bot@chromium.org
4382330a15 Replace GR_*_BUILD by their SK_BUILD_FOR_* equivalents.
BUG=None
TEST=None, no functional changes.
R=bsalomon@google.com, robertphillips@google.com

Author: tfarina@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11457 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-25 20:57:51 +00:00
reed@google.com
d28ba8010c promote SkImage::AlphaType to SkAlphaType
BUG=
R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11421 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-20 19:33:52 +00:00
mtklein@google.com
519f9677a4 Add sk_calloc. Remove SkMemory_stdlib, which seems unused.
I'm seeing basically no difference between malloc + bzero and calloc on my desktop, but on a Galaxy Nexus calloc is never slower, and significantly faster once the allocation size becomes large, both for allocation and for _reading_.

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11414 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-20 14:31:45 +00:00
commit-bot@chromium.org
22d69f9973 I'm investigating how to make the IPC transfer a bit more secure on the
skia side by adding some safety checks. This cl is about brainstorming
and proposing possible solutions for type checking at different stages.

BUG=
R=senorblanco@google.com, sugoi@google.com, scroggo@google.com, reed@android.com, senorblanco@chromium.org, mtklein@google.com, reed@google.com

Author: sugoi@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11395 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-19 18:40:49 +00:00
jvanverth@google.com
4ea2878f07 Add string art GM and sample.
BUG=279014
R=robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11383 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-19 15:32:22 +00:00
djsollen@google.com
1f584ed3f4 Update Android's FontHost to return NULL if familyName does not match
R=scroggo@google.com, wangxianzhu@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11377 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-19 12:08:40 +00:00
robertphillips@google.com
35349d80b3 Revert r11342 (Add infrastructure for testing the debugger code) due to build breakages
git-svn-id: http://skia.googlecode.com/svn/trunk@11343 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-18 13:28:10 +00:00
commit-bot@chromium.org
15ec2ea617 Add infrastructure for testing the debugger code.
This creates the necessarily files and GYP targets to start adding tests
for the debugger code. There is currently one test added, more will be added
once the infrastructure is in place.

BUG=
R=mtklein@google.com

Author: dsinclair@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11342 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-18 13:01:17 +00:00
commit-bot@chromium.org
a0b40280a4 Replace uses of GrNoncopyable by SkNoncopyable.
BUG=None
TEST=None, no functional changes.
R=bsalomon@google.com, robertphillips@google.com

Author: tfarina@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11341 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-18 13:00:55 +00:00
reed@google.com
636d87a3f4 update devicelooper to skip internal tiles that are empty, and unittests
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11331 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-17 20:03:43 +00:00
jvanverth@google.com
dcd36f3c9d Add Clock Sample.
There are two possible rendering methods: paths (default) or primitives.
At the moment the rrect primitive only supports axis-aligned rrects for
GPU acceleration, so that will not be a win on GPU.

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11330 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-17 19:52:05 +00:00
djsollen@google.com
6def2a2dc7 Add a test for color bitmap fonts.
This CL also includes a sample font from https://code.google.com/p/color-emoji/

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11317 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-17 15:30:21 +00:00
caryclark@google.com
570863f2e2 path ops work in progress
path ops work in progress

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11291 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-16 15:55:01 +00:00
robertphillips@google.com
24ddde9758 Revert 11247, 11250, 11251, 11257, and 11279 to unblock DEPS roll (https://codereview.chromium.org/24159002/)
11279 Sanitizing source files in Housekeeper-Nightly - https://code.google.com/p/skia/source/detail?r=11279
11257 Canary build fix - https://codereview.chromium.org/23532068
11251 More warnings as errors fixes - https://code.google.com/p/skia/source/detail?r=11251
11250 Warnings as errors fix - https://code.google.com/p/skia/source/detail?r=11250
11247 Initial error handling code - https://chromiumcodereview.appspot.com/23021015



git-svn-id: http://skia.googlecode.com/svn/trunk@11288 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-16 14:04:05 +00:00
robertphillips@google.com
ba6e954140 Revert the revert of 11247, 11250, 11251 and 11279 (Chrome already relies on changes in r11247)
git-svn-id: http://skia.googlecode.com/svn/trunk@11287 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-16 13:40:12 +00:00
robertphillips@google.com
478884f7d3 Revert 11247, 11250, 11251 and 11279 to unblock DEPS roll (https://codereview.chromium.org/24159002/)
11279 Sanitizing source files in Housekeeper-Nightly - https://code.google.com/p/skia/source/detail?r=11279
11251 More warnings as errors fixes - https://code.google.com/p/skia/source/detail?r=11251
11250 Warnings as errors fix - https://code.google.com/p/skia/source/detail?r=11250
11247 Initial error handling code - https://chromiumcodereview.appspot.com/23021015



git-svn-id: http://skia.googlecode.com/svn/trunk@11285 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-16 13:19:11 +00:00
edisonn@google.com
af54a513a5 pdfviewer: do not submit, uploaded for backup, and will be done actually after I refactor the params for functions, to put the char* params in a structure: report errors and warnings in pdf, infrastructure
Review URL: https://codereview.chromium.org/23902018

git-svn-id: http://skia.googlecode.com/svn/trunk@11262 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-13 19:33:42 +00:00
mtklein@google.com
1fb04e2540 add a way to get code coverage
BUG=
R=borenet@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11261 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-13 19:32:43 +00:00
commit-bot@chromium.org
5792cded61 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=
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://chromiumcodereview.appspot.com/23021015

git-svn-id: http://skia.googlecode.com/svn/trunk@11247 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-13 12:39:34 +00:00
mtklein@google.com
c289743864 Major bench refactoring.
- Use FLAGS_.
   - Remove outer repeat loop.
   - Tune inner loop automatically.

BUG=skia:1590
R=epoger@google.com, scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11187 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-10 19:23:38 +00:00