Commit Graph

1381 Commits

Author SHA1 Message Date
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