humper [Fri, 27 Jun 2014 18:27:03 +0000 (11:27 -0700)]
Refactor bitmap scaler to make it easier to migrate rest of chrome to use it
Previously, the set of platform-specific function pointers to do fast convolution (e.g., neon, SSE) were passed in a structure to the scaler.
I refactored this so that the scaler fills in these function pointers after it's called, so the caller doesn't have to worry about it.
R=mtklein@google.com
TBR=mtklein
NOTRY=True
Author: humper@google.com
Review URL: https://codereview.chromium.org/
354193002
halcanary [Fri, 27 Jun 2014 17:37:27 +0000 (10:37 -0700)]
Add lock to SkPDFDict
Add mutex lock to all functions. Remove dictionary iterator, and
replace with new thread-safe functions.
BUG=skia:2683
R=mtklein@google.com, djsollen@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/
360473005
robertphillips [Fri, 27 Jun 2014 15:59:26 +0000 (08:59 -0700)]
Fix RRect tranform bug
When a RRect is an oval transforming the rectangle and the radii separately can result in a non-oval result (i.e., due to numerical issues some tiny straight edges may creep in). This CL remedies the situation by computing the new radii directly from the transformed rect.
BUG=skia:2696
R=caryclark@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/
354913004
tomhudson [Fri, 27 Jun 2014 15:19:35 +0000 (08:19 -0700)]
Mark SkBBoxHierarchyRecord destructor as virtual
Immediate parent classes have empty virtual destructors, but farther
up the inheritance tree there is complicated destruction going on.
This change may be unnecessary but makes the polymorphism explicit.
BUG=skia:1734
R=mtklein@google.com, tomhudson@google.com, mtklein
Author: tomhudson@chromium.org
Review URL: https://codereview.chromium.org/
359773002
henrik.smiding [Fri, 27 Jun 2014 15:03:17 +0000 (08:03 -0700)]
Add SSE4 optimization of S32A_Opaque_Blitrow
Adds optimization of Skia S32A_Opaque_Blitrow blitter using SSE4.2 SIMD
instruction set. Special case for when alpha is zero or opaque.
Performance increase of 10%-400% compared to the existing SSE2
optimization (measured on Silvermont architecture).
Noticeable in ~25 different skia bench subtests, especially in
bitmap_8888_*, repeatTile_*, and morph_*.
bitmap_8888_A - 100% faster
bitmap_8888_A_source_transparent - 250% faster
bitmap_8888_A_source_opaque - 25% faster
bitmap_8888_A_scale_bicubic - 75% faster
Signed-off-by: Henrik Smiding <henrik.smiding@intel.com>
Committed: https://skia.googlesource.com/skia/+/
e2527b147679b0c43019fae7d59cc3777d2d097e
Committed: https://skia.googlesource.com/skia/+/
b5c281e1e06af3be804309877de1dac6145686b9
R=reed@google.com, mtklein@google.com, tomhudson@google.com, djsollen@google.com, joakim.landberg@intel.com
Author: henrik.smiding@intel.com
Review URL: https://codereview.chromium.org/
289473009
reed [Fri, 27 Jun 2014 13:48:14 +0000 (06:48 -0700)]
add SkSurface::NewRasterDirectReleaseProc
allows for lifetime control of pixel memory on raster surface
BUG=skia:
R=fmalita@google.com, bsalomon@google.com, fmalita@chromium.org
Author: reed@google.com
Review URL: https://codereview.chromium.org/
351373005
reed [Fri, 27 Jun 2014 12:49:53 +0000 (05:49 -0700)]
remove unnecessary bitmapdevice references
TBR=
Author: reed@google.com
Review URL: https://codereview.chromium.org/
354143004
reed [Fri, 27 Jun 2014 11:49:12 +0000 (04:49 -0700)]
delete code for SK_SUPPORT_LEGACY_GETTOTALCLIP
TBR=
NOTRY=True
Author: reed@google.com
Review URL: https://codereview.chromium.org/
354953008
borenet [Fri, 27 Jun 2014 08:02:30 +0000 (01:02 -0700)]
Update SKP version to 34
Automatic commit by the RecreateSKPs bot.
TBR=
Author: borenet@google.com
Review URL: https://codereview.chromium.org/
347303003
reed [Fri, 27 Jun 2014 05:12:09 +0000 (22:12 -0700)]
don't create explicit bitmapdevice when not needed
TBR=
Author: reed@google.com
Review URL: https://codereview.chromium.org/
349213006
reed [Fri, 27 Jun 2014 01:47:08 +0000 (18:47 -0700)]
remove SK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE for chrome
BUG=skia:
R=robertphillips@google.com, fmalita@google.com, fmalita@chromium.org
Author: reed@google.com
Review URL: https://codereview.chromium.org/
355083006
kelvinly [Thu, 26 Jun 2014 22:39:31 +0000 (15:39 -0700)]
Fix scale type in JSON format
BUG=skia:
R=bensong@google.com, jcgregorio@google.com
Author: kelvinly@google.com
Review URL: https://codereview.chromium.org/
354953007
rmistry [Thu, 26 Jun 2014 21:31:06 +0000 (14:31 -0700)]
Revert of Switch SkPDFStream's internal storage from SkStream to SkData (https://codereview.chromium.org/
340783013/)
Reason for revert:
Causes canary failures
Original issue's description:
> Switch SkPDFStream's internal storage from SkStream to SkData
>
> Motivation: This makes SkPDFStream thread-safe for two threads
> serializing it at once, since a SkStream has an internal position.
>
> Updated SkPDFFont, SkPDFGraphicState, and SkPDFPage's use of
> SkPDFStream to use the SkData constructor rather than the SkStream
> constructor (saving a memcpy).
>
> BUG=skia:2683
>
> Committed: https://skia.googlesource.com/skia/+/
c1dfa14b645ae274780f026dd86c9b633fbdad06
R=mtklein@google.com, djsollen@google.com, halcanary@google.com
TBR=djsollen@google.com, halcanary@google.com, mtklein@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2683
Author: rmistry@google.com
Review URL: https://codereview.chromium.org/
354043005
halcanary [Thu, 26 Jun 2014 21:00:31 +0000 (14:00 -0700)]
Switch SkPDFStream's internal storage from SkStream to SkData
Motivation: This makes SkPDFStream thread-safe for two threads
serializing it at once, since a SkStream has an internal position.
Updated SkPDFFont, SkPDFGraphicState, and SkPDFPage's use of
SkPDFStream to use the SkData constructor rather than the SkStream
constructor (saving a memcpy).
BUG=skia:2683
R=mtklein@google.com, djsollen@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/
340783013
tfarina [Thu, 26 Jun 2014 20:07:05 +0000 (13:07 -0700)]
Promote SkInterpolator unit test to our tests driver.
BUG=None
TEST=make tests && out/Debug/tests -m Interpolator
R=mtklein@google.com, bsalomon@google.com
Author: tfarina@chromium.org
Review URL: https://codereview.chromium.org/
351713005
bsalomon [Thu, 26 Jun 2014 19:56:28 +0000 (12:56 -0700)]
Make LTCG optional on windows builds.
R=mtklein@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/
335123010
bsalomon [Thu, 26 Jun 2014 19:56:22 +0000 (12:56 -0700)]
Add trace event when GrBufferAllocPool unmaps a buffer indicating what % of the buffer was unwritten.
R=egdaniel@google.com
TBR=egdaniel@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/
339433009
rmistry [Thu, 26 Jun 2014 18:35:33 +0000 (11:35 -0700)]
Rebaseline Test-Android-Logan-Nvidia-Arm7-*
Reviewed both by mtklein and bsalomon in skia:2695.
TBR=
BUG=skia:2695
NOTREECHECKS=true
NOTRY=true
Author: rmistry@google.com
Review URL: https://codereview.chromium.org/
352353004
kelvinly [Thu, 26 Jun 2014 18:26:40 +0000 (11:26 -0700)]
Make SKP bench JSON ouput better
BUG=skia:
NOTREECHECKS=true
R=bensong@google.com, jcgregorio@google.com, bsalomon@google.com, robertphillips@google.com, rmistry@google.com
Author: kelvinly@google.com
Review URL: https://codereview.chromium.org/
329993008
Mike Klein [Thu, 26 Jun 2014 15:04:28 +0000 (11:04 -0400)]
Don't set SK_MALLOC_TEMP in SkAutoTMalloc.
Unlike SkAutoSTMalloc, it doesn't make sense for SkAutoTMalloc to set
SK_MALLOC_TEMP. See SkAutoMalloc/SkAutoSMalloc for similar in the void*
world.(This change is a documentation-only no-op. No code pays any
attention to SK_MALLOC_TEMP.)
BUG=skia:
R=halcanary@google.com
Review URL: https://codereview.chromium.org/
356913003
bsalomon [Thu, 26 Jun 2014 15:01:14 +0000 (08:01 -0700)]
Add SK_API to SkWriter32
R=mtklein@google.com, senorblanco@google.com, senorblanco@chromium.org
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/
356053002
kevin.petit [Thu, 26 Jun 2014 09:51:29 +0000 (02:51 -0700)]
ARM Skia NEON patches - 40 - arm64: S32A_D565_Opaque
Here are some perf results:
+-------+------------+------------+
| count | Cortex-A53 | Cortex-A57 |
+-------+------------+------------+
| 1 | -2.54% | -5.39% |
+-------+------------+------------+
| 2 | -0.66% | -2.08% |
+-------+------------+------------+
| 4 | -11.13% | 0.00% |
+-------+------------+------------+
| 8 | -5.79% | -1.30% |
+-------+------------+------------+
| 16 | 71.60% | 93.27% |
+-------+------------+------------+
| 64 | 30.99% | 57.35% |
+-------+------------+------------+
| 256 | 25.41% | 52.59% |
+-------+------------+------------+
| 1024 | 25.56% | 53.76% |
+-------+------------+------------+
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
BUG=skia:
R=mtklein@google.com, djsollen@google.com
Author: kevin.petit@arm.com
Review URL: https://codereview.chromium.org/
346843003
borenet [Thu, 26 Jun 2014 06:53:02 +0000 (23:53 -0700)]
Update SKP version to 33
Automatic commit by the RecreateSKPs bot.
TBR=
Author: borenet@google.com
Review URL: https://codereview.chromium.org/
336613005
senorblanco [Wed, 25 Jun 2014 21:39:05 +0000 (14:39 -0700)]
Remove SkBicubicImageFilter, and all related tests.
Now that we have SkResizeImageFilter, and the bicubic
resizing is part of skia proper, there's no need for a
specialized image filter.
BUG=skia:
R=bsalomon@google.com
Author: senorblanco@chromium.org
Review URL: https://codereview.chromium.org/
357793002
mtklein [Wed, 25 Jun 2014 21:08:00 +0000 (14:08 -0700)]
Add nanobench, a fresh look at our microbenchmark harness.
out/Release/nanobench runs 4-5x faster on my Z620 and ~2x faster on my N5 than out/Release/bench with the same configs.
(Debug isn't really comparable. I haven't added the Debug -> single loop check.)
BUG=skia:
R=djsollen@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/
347443002
halcanary [Wed, 25 Jun 2014 20:28:29 +0000 (13:28 -0700)]
tools/git-sync-deps is a stand-alone program, not dependent on synced deps.
Motivation: With common repo, we had a chicken-egg problem.
BUG=skia:
R=borenet@google.com, mtklein@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/
351063003
mtklein [Wed, 25 Jun 2014 19:40:51 +0000 (12:40 -0700)]
Add noinline for GCC 4.6, which seems to vectorize after inlining.
GCC 4.7 and 4.8 don't need this, but we're not building with them so it doesn't hurt.
BUG=skia:
R=mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/
343423003
george [Wed, 25 Jun 2014 19:14:30 +0000 (12:14 -0700)]
"interface" is defined in Windows headers, so undef it in GrGLCaps so we don't have a name collision
R=bsalomon@google.com, mtklein@google.com, bsalomon
BUG=skia:
Author: george@mozilla.com
Review URL: https://codereview.chromium.org/
344253003
mtklein [Wed, 25 Jun 2014 18:38:00 +0000 (11:38 -0700)]
Narrow disabled vectorization further to just ConvolveHorizontally.
BUG=skia:2575
R=mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/
352883002
tfarina [Wed, 25 Jun 2014 17:39:00 +0000 (10:39 -0700)]
Rename TestSize.cpp to SizeTest.cpp
It is the only file where Test is the prefix rather than the sufix.
This patch fixes that so it matches with the rest of the files
under tests/ directory.
And separate SkISize test into its own DEF_TEST().
BUG=None
TEST=make tests && out/Debug/tests
R=mtklein@google.com
Author: tfarina@chromium.org
Review URL: https://codereview.chromium.org/
337783007
Mike Klein [Wed, 25 Jun 2014 17:21:56 +0000 (13:21 -0400)]
Rebase Test-Ubuntu12-ShuttleA-GTX660-x86-Release.
BUG=skia:2575
Review URL: https://codereview.chromium.org/
353883002
Mike Klein [Wed, 25 Jun 2014 16:35:19 +0000 (12:35 -0400)]
try release only
Mike Klein [Wed, 25 Jun 2014 16:23:53 +0000 (12:23 -0400)]
disable on nacl
mtklein [Wed, 25 Jun 2014 16:14:28 +0000 (09:14 -0700)]
Focus disabled optimizations on just BGRAConvolve2D, and only 32-bit.
Last CL accidentally disabled autovectorization on 64-bit builds too.
This fixes that.
BUG=skia:2575
R=rmistry@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/
353823005
borenet [Wed, 25 Jun 2014 15:40:58 +0000 (08:40 -0700)]
Whitespace fixes for Python tools
BUG=skia:
R=rmistry@google.com
Author: borenet@google.com
Review URL: https://codereview.chromium.org/
353853003
mtklein [Wed, 25 Jun 2014 15:27:08 +0000 (08:27 -0700)]
Temporarily disable autovectorization in core for 32-bit Linux builds.
BUG=skia:2575
R=rmistry@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/
354833006
bsalomon [Wed, 25 Jun 2014 15:25:30 +0000 (08:25 -0700)]
Add valgrind supp for NV driver.
R=mtklein@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/
351053002
Eric Boren [Wed, 25 Jun 2014 15:13:27 +0000 (11:13 -0400)]
Use new common tools in Python scripts
BUG=skia:2682
R=rmistry@google.com
Review URL: https://codereview.chromium.org/
330423004
kkinnunen [Wed, 25 Jun 2014 11:30:38 +0000 (04:30 -0700)]
Ignore degeneratesegments for nvprmsaa4 to unbreak the build
Ignore degeneratesegments for nvprmsaa4 to unbreak the build. The result image
seems to be inconsistent with different Linux GTX660 builds. Ignore the test for
Test-Ubuntu12-ShuttleA-GTX660-x86_64-Release.
BUG=skia:2689
R=rmistry@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/
345423006
borenet [Wed, 25 Jun 2014 07:29:50 +0000 (00:29 -0700)]
Update SKP version to 32
Automatic commit by the RecreateSKPs bot.
TBR=
Author: borenet@google.com
Review URL: https://codereview.chromium.org/
352073002
mtklein [Tue, 24 Jun 2014 22:19:25 +0000 (15:19 -0700)]
Disable bogus _scaled benches until we can figure out why they're bogus.
BUG=skia:
R=halcanary@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/
357513006
robertphillips [Tue, 24 Jun 2014 22:08:49 +0000 (15:08 -0700)]
Rename GrAtlasMgr to GrAtlas (and other cleanup)
This CL also renames the old GrAtlas to ClientPlotUsage and moves it into the new GrAtlas.
R=jvanverth@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/
355673002
Brian Salomon [Tue, 24 Jun 2014 22:08:09 +0000 (18:08 -0400)]
rebase GMs
BUG=skia:
Review URL: https://codereview.chromium.org/
351973003
mtklein [Tue, 24 Jun 2014 21:16:50 +0000 (14:16 -0700)]
delete disabled bench
BUG=skia:
R=tomhudson@google.com, mtklein@google.com, junov@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/
354693003
egdaniel [Tue, 24 Jun 2014 20:43:12 +0000 (13:43 -0700)]
Remove special case gpu transforms for Identity and Translate
Change will remove some special cases for coord transforms in favor of not needing to compile
a new program if the coord trans changes from one special case to another.
BUG=skia:
R=bsalomon@google.com
Author: egdaniel@google.com
Review URL: https://codereview.chromium.org/
344233006
robertphillips [Tue, 24 Jun 2014 20:10:43 +0000 (13:10 -0700)]
Move allocation of texture from SkGpuDevice to GrLayerCache
In order to atlas the layers the GrLayerCache needs to be given more control over where a given layer's texture is allocated (i.e., it could be a raw scratch texture or in the cache).
R=bsalomon@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/
350183006
borenet [Tue, 24 Jun 2014 19:40:01 +0000 (12:40 -0700)]
Bench: Change default maxMs from 4s to 1s.
Speculative fix for Android crashes.
BUG=skia:2080
R=mtklein@google.com, djsollen@google.com
Author: borenet@google.com
Review URL: https://codereview.chromium.org/
346263011
mtklein [Tue, 24 Jun 2014 19:28:34 +0000 (12:28 -0700)]
Support serialization in SkRecord-backed SkPictures.
Update DM to test SkRecord through SkPictureRecorder API.
BUG=skia:
R=robertphillips@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/
345553003
bsalomon [Tue, 24 Jun 2014 18:16:52 +0000 (11:16 -0700)]
Make GrGLShaderBuilder::fragmentPosition() return a vec4, with 1.0 as the zw components when in the y-flip case. This works around an Adreno driver bug.
Revert "Stop referencing gl_FragCoord z and w components."
This reverts commit
160a52ba217012ed73c240f6d67b3bbf2b4879d6.
R=jvanverth@google.com
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/
354663002
jvanverth [Tue, 24 Jun 2014 18:06:02 +0000 (11:06 -0700)]
Another iOS fix for SampleApp.
R=caryclark@google.com
Author: jvanverth@google.com
Review URL: https://codereview.chromium.org/
353683003
mtklein [Tue, 24 Jun 2014 17:12:39 +0000 (10:12 -0700)]
Prune some dead code from SkPicture.cpp.
There's no path that makes playback != fPlayback.get() anymore.
BUG=skia:
R=robertphillips@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/
352643002
caryclark [Tue, 24 Jun 2014 15:30:15 +0000 (08:30 -0700)]
add path dump test
Add a unit test for SkPath::dump(). The unit test exposed a minor
bug (inconsistent CRs) and an unused parameter (title).
R=bsalomon@google.com
TBR=bsalomon
BUG=skia:1836
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/
351833003
Mike Klein [Tue, 24 Jun 2014 15:29:06 +0000 (11:29 -0400)]
Tick off some TODOs:
- support fRecord in copy constructor
- support SkDrawPictureCallback
Moved SkDrawPictureCallback to its own header so
SkRecordDraw can include it without pulling in all of
SkPicture.
Adding an SkAutoSaveRestore to SkRecordDraw was the easiest
way to match the balance guarantees of the callback, and
probably not a bad idea in general. Updated its tests.
BUG=skia:
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/
349973008
mtklein [Tue, 24 Jun 2014 15:26:30 +0000 (08:26 -0700)]
Tidy up fOwner in SkMutex_pthread.h.
- Initialize fOwner to kNoOwner in SkMutex::SkMutex.
- Note that we're stretching the API with kNoOwner.
- Use pthread_equal() instead of ==.
BUG=387993
R=halcanary@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/
357473002
caryclark [Tue, 24 Jun 2014 14:55:11 +0000 (07:55 -0700)]
add pathops tight bounds; conform path ops' gyp to unit tests
Implement path tight bounds using path ops machinery. This is not
as efficient as it could be; for instance, internally, it creates
a path ops structure more suited to intersection. If this shows
up as a performance bottleneck, it could be improved.
Fix path ops gyp files, which have fallen out of sync with other
tests.
R=mtklein@google.com, bsalomon@google.com
TBR=mtklein
BUG=skia:1712
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/
348343002
tfarina [Tue, 24 Jun 2014 13:50:39 +0000 (06:50 -0700)]
Preprend Test to test function name generated by DEF_TEST() macro.
That way when declaring a test with DEF_TEST() macro, you don't have to
uniquify the test name because it might colide with the class it is
being testing.
For example, if you are testing SkBase64 and do:
DEF_TEST(SkBase64, reporter) {
}
That will generate an error because the macro will declare a function
named SkBase64 which colides with the type SkBase64.
By adding Test to the function name we avoid this problem.
Fixed the entries found with the following command line:
$ git grep "Test, r" | grep DEF
BUG=None
TEST=make tests && out/Debug/tests
R=mtklein@google.com
Author: tfarina@chromium.org
Review URL: https://codereview.chromium.org/
345753007
kkinnunen [Tue, 24 Jun 2014 12:43:21 +0000 (05:43 -0700)]
Initialize a variable in GrDrawTarget::drawPaths
Initialize the device bounds rect variable before use in GrDrawTarget::drawPaths.
R=rmistry@google.com, jvanverth@google.com, mtklein@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/
355603003
kkinnunen [Tue, 24 Jun 2014 11:45:57 +0000 (04:45 -0700)]
Rebaseline gm results after "Implement text rendering with NVPR"
Rebaseline gm results after "Implement text rendering with NVPR". The text is
rasterized by NV_path_rendering extension, so pixels are expected to be a bit
different.
NOTRY=true
R=rmistry@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/
346413002
kkinnunen [Tue, 24 Jun 2014 07:12:27 +0000 (00:12 -0700)]
Implement text rendering with NVPR
Use path rendering to render the text from outlines if supported by the
GPU. Implement this in GrStencilAndCoverTextContext by copying chunks of code
from GrBitmapTextContext.
The drawing is implemented with "instanced" path drawing functions.
Moves the creation of the "main" text context from SkGpuDevice to the
GrContext::createTextContext. This is done because the decision of which text
renderer is optimal can be made only with the internal implementation-specific
information of the context.
Remove a windows assertion from SkScalerContext_GDI::getGDIGlyphPath. The
GetGlyphOutlineW fails in fontmgr_match for the initial space char in the string
" [700] ...". According to MSDN, this is a known problem. Just return that the
glyph has no path data in these cases.
R=jvanverth@google.com, bsalomon@google.com, mtklein@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/
196133014
Mike Klein [Mon, 23 Jun 2014 19:29:52 +0000 (15:29 -0400)]
No one uses SkPicture::swap.
BUG=skia:
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/
349313004
Mike Klein [Mon, 23 Jun 2014 19:13:26 +0000 (15:13 -0400)]
Enable basic drawing with SkRecord-based pictures.
I've tagged all the functions in SkPicture.cpp is // fRecord TODO or // fRecord
OK, depending on whether or not they're totally broken when used from an
SkRecord-based picture. Obviously next steps are to eliminate all the TODOs,
then clean up the notes.
I converted SkPicture over to smart pointers too. It's particularly helpful
that the smart pointers initialize to NULL by default.
For now I've got all the SkRecord-based code jammed in at the bottom of the file. I figure it'll help me keep things straight for a bit, then we can rearrange later.
BUG=skia:
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/
333823007
caryclark [Mon, 23 Jun 2014 18:25:00 +0000 (11:25 -0700)]
use platform-independent font for gm
Create a custom typeface and scaler to render simple paths the
same on all platforms.
GM tests are modified to explicitly select the custom typeface.
R=reed@google.com, mtklein@google.com, bungeman@google.com
TBR=reed
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/
348323003
Ben Wagner [Mon, 23 Jun 2014 17:53:26 +0000 (13:53 -0400)]
Remove unneeded return from DirectWrite.
rmistry [Mon, 23 Jun 2014 17:32:29 +0000 (10:32 -0700)]
Rebaseline shadertext2_{gpu,8888} after SkPaint::measureText changes
These two GMs were missing from https://codereview.chromium.org/
347393002/.
This CL is to fix http://108.170.220.121:10117/static/view.html#/view.html?resultsToLoad=%2Fresults%2Ffailures&displayLimitPending=50&showThumbnailsPending&mergeIdenticalRowsPending&imageSizePending=100&sortColumnSubdict=differenceData&sortColumnKey=perceptualDifference&hiddenResultTypes=failure-ignored,no-comparison,succeeded&hiddenConfigs=&builder=Test-Win7-ShuttleA-HD2000-x86-Release&test=
BUG=skia:
R=kkinnunen@nvidia.com, jvanverth@google.com, mtklein@google.com
Author: rmistry@google.com
Review URL: https://codereview.chromium.org/
333193003
Mike Klein [Mon, 23 Jun 2014 17:29:10 +0000 (13:29 -0400)]
Use smart pointers to make SkPictureRecorder lifetimes less manual.
BUG=skia:
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/
344253005
kelvinly [Mon, 23 Jun 2014 16:02:38 +0000 (09:02 -0700)]
Add schemas to Skia repo
BUG=skia:
R=bensong@google.com, jcgregorio@google.com
Author: kelvinly@google.com
Review URL: https://codereview.chromium.org/
332663005
robertphillips [Mon, 23 Jun 2014 16:01:51 +0000 (09:01 -0700)]
Remove suppression of distantclip image differences
R=rmistry@google.com, rmistry@chromium.org
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/
349233004
bungeman [Mon, 23 Jun 2014 15:29:23 +0000 (08:29 -0700)]
Better rendering detection with DirectWrite.
When requesting embedded bitmaps, all sizes in a gridfit gasp range with a
bitmap in that range should be gridfit to the fullest extent possible.
R=eae@chromium.org, reed@google.com, mtklein@google.com
Author: bungeman@google.com
Review URL: https://codereview.chromium.org/
341343002
kkinnunen [Mon, 23 Jun 2014 13:59:46 +0000 (06:59 -0700)]
Rebaseline shadertext2 after SkPaint::measureText changes
Rebaseline shadertext2 after commit "Fix SkPaint::measureText for stroked
hairline text".
Unignore ignored shadertext2 for Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug
pdf-poppler.
The label "Filled" in the test moves to the left due to the changes in the
measurement. The SkPaint::measureText will use the "use paths" code path,
similar to the drawing code. This results in different length for the string
"Filled".
As a side-note, the test probably measures either wrong text or uses wrong
paint. This can be fixed separately.
NOTREECHECKS=true
NOTRY=true
R=jvanverth@google.com, mtklein@google.com, rmistry@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/
347393002
rmistry [Mon, 23 Jun 2014 13:59:15 +0000 (06:59 -0700)]
Revert of Revert of Fix SkPaint::measureText for stroked hairline text (https://codereview.chromium.org/
354433002/)
Reason for revert:
Rebaseline CL is ready to be submitted
Original issue's description:
> Revert of Fix SkPaint::measureText for stroked hairline text (https://codereview.chromium.org/
335603003/)
>
> Reason for revert:
> Caused many shadertext GM failures
>
> Original issue's description:
> > Fix SkPaint::measureText for stroked hairline text
> >
> > SkPaint::measureText and text drawing used different criteria for
> > determining whether text should be drawn as paths or not.
> >
> > Adds tests glyph_pos_(h/n)_(s/f/b) to test the text rendering and the glyph
> > positioning in the rendering. Mainly added in order to define what is the
> > expected text rendering when hairline stroke is used with various transform
> > options.
> >
> > The testcase also tries to note or highlight the fact that SkPaint::measureText
> > is not expected to produce intuitively matching results when compared to a
> > rendering, if the rendering is done so that the device ends up having a device
> > transform.
> >
> > This fixes the glyph_pos_h_s (hairline, stroked) test-case.
> >
> > Ignore shadertext2_pdf-poppler.png gm on
> > Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug temporarily, as that fails.
> >
> > Committed: https://skia.googlesource.com/skia/+/
196af738027c5e18c3eb792dbcaf90ef27821793
>
> TBR=jvanverth@google.com,reed@google.com,kkinnunen@nvidia.com
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/
abc9bb55ddfeb4b1a7acc335a34841fddcd22d27
R=jvanverth@google.com, reed@google.com, kkinnunen@nvidia.com
TBR=jvanverth@google.com, kkinnunen@nvidia.com, reed@google.com
NOTREECHECKS=true
NOTRY=true
Author: rmistry@google.com
Review URL: https://codereview.chromium.org/
349153005
rmistry [Mon, 23 Jun 2014 13:13:46 +0000 (06:13 -0700)]
Revert of Support using OpenGL ES context on desktop (https://codereview.chromium.org/
319043005/)
Reason for revert:
Caused segmentation fault on many builders. Please see reverted CL's msg #21 for details.
Original issue's description:
> Support using OpenGL ES context on desktop
>
> Support using OpenGL ES context on desktop for unix and Android platforms. This
> is mainly useful in development.
>
> Add --gpuAPI flag to gm, dm, bench, bench_pictures and render_pictures. The
> possible parameters for the flag are "gl" and "gles".
>
> Committed: https://skia.googlesource.com/skia/+/
74fc727dc88ee24d89f88cb1709f963e9073aeb3
R=bsalomon@google.com, mtklein@google.com, robertphillips@google.com, kkinnunen@nvidia.com
TBR=bsalomon@google.com, kkinnunen@nvidia.com
NOTREECHECKS=true
NOTRY=true
Author: rmistry@google.com
Review URL: https://codereview.chromium.org/
351583002
rmistry [Mon, 23 Jun 2014 13:06:36 +0000 (06:06 -0700)]
Revert of Add functions to support NV_path_rendering in OpenGL ES (https://codereview.chromium.org/
345723002/)
Reason for revert:
Will have to unfortunately revert this CL in order to revert https://codereview.chromium.org/
319043005/
Original issue's description:
> Add functions to support NV_path_rendering in OpenGL ES
>
> Add OpenGL ES extension functions needed to support NV_path_rendering in OpenGL
> ES.
>
> The added glProgramPathFragmentInputGenNV call is defined in NV_path_rendering
> revision 30, similar to following:
>
> Append to the end of the "Shader Inputs" subsection of Section 3.12.2
> "Shader Execution":
>
> The command
>
> void ProgramPathFragmentInputGenNV(uint program,
> int location,
> enum genMode,
> int components,
> const float *coeffs);
>
> controls how a user-defined (non-built-in) fragment input of a
> GLSL program object is computed for fragment shading operations that
> occur as a result of CoverFillPathNV or CoverStrokePathNV.
>
> /program/ names a GLSL program object. If /program/ has not been
> successfully linked, the error INVALID_OPERATION is generated.
>
> The given fragment input generation state is loaded into the fragment
> input variable location identified by /location/. This location
> is a value returned either by GetProgramResourceLocation with a
> /programInterface/ of FRAGMENT_INPUT_NV and a given fragment shader
> input variable name or by GetProgramResourceiv with FRAGMENT_INPUT_NV
> for the /programInterface/ and LOCATION for the property for a given
> fragment input resource index.
>
> ....
>
> glProgramPathFragmentInputGenNV will be used instead of glPathTexGen,
> because the latter depends on fixed function pipeline that is not
> exposed in ES.
>
> Also add glGetProgramResourceLocation from OpenGL 4.3 or
> ARB_program_interface_query.
>
> Also add FRAGMENT_INPUT define to be used with glGetProgramResourceLocation.
>
> The added functions are not used yet, but they're needed when implementing
> NV_path_rendering support for OpenGL ES. They can also be used on OpenGL.
>
> Remove uncalled NV_path_rendering functions, so they do not cause confusion
> or take space in the interface definition. The ones that are later used
> can be re-added when needed.
>
> Remove definitions NV_path_rendering that are for NV_path_rendering function
> parameters that are not used. The ones that are later used
> can be re-added when needed.
>
> Committed: https://skia.googlesource.com/skia/+/
4a995dfff2ecf91e8bf999d77e3218cec596232c
R=bsalomon@google.com, kkinnunen@nvidia.com
TBR=bsalomon@google.com, kkinnunen@nvidia.com
NOTREECHECKS=true
NOTRY=true
Author: rmistry@google.com
Review URL: https://codereview.chromium.org/
349983002
rmistry [Mon, 23 Jun 2014 12:39:26 +0000 (05:39 -0700)]
Revert of Fix SkPaint::measureText for stroked hairline text (https://codereview.chromium.org/
335603003/)
Reason for revert:
Caused many shadertext GM failures
Original issue's description:
> Fix SkPaint::measureText for stroked hairline text
>
> SkPaint::measureText and text drawing used different criteria for
> determining whether text should be drawn as paths or not.
>
> Adds tests glyph_pos_(h/n)_(s/f/b) to test the text rendering and the glyph
> positioning in the rendering. Mainly added in order to define what is the
> expected text rendering when hairline stroke is used with various transform
> options.
>
> The testcase also tries to note or highlight the fact that SkPaint::measureText
> is not expected to produce intuitively matching results when compared to a
> rendering, if the rendering is done so that the device ends up having a device
> transform.
>
> This fixes the glyph_pos_h_s (hairline, stroked) test-case.
>
> Ignore shadertext2_pdf-poppler.png gm on
> Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug temporarily, as that fails.
>
> Committed: https://skia.googlesource.com/skia/+/
196af738027c5e18c3eb792dbcaf90ef27821793
R=jvanverth@google.com, reed@google.com, kkinnunen@nvidia.com
TBR=jvanverth@google.com, kkinnunen@nvidia.com, reed@google.com
NOTREECHECKS=true
NOTRY=true
Author: rmistry@google.com
Review URL: https://codereview.chromium.org/
354433002
kkinnunen [Mon, 23 Jun 2014 06:32:32 +0000 (23:32 -0700)]
Add functions to support NV_path_rendering in OpenGL ES
Add OpenGL ES extension functions needed to support NV_path_rendering in OpenGL
ES.
The added glProgramPathFragmentInputGenNV call is defined in NV_path_rendering
revision 30, similar to following:
Append to the end of the "Shader Inputs" subsection of Section 3.12.2
"Shader Execution":
The command
void ProgramPathFragmentInputGenNV(uint program,
int location,
enum genMode,
int components,
const float *coeffs);
controls how a user-defined (non-built-in) fragment input of a
GLSL program object is computed for fragment shading operations that
occur as a result of CoverFillPathNV or CoverStrokePathNV.
/program/ names a GLSL program object. If /program/ has not been
successfully linked, the error INVALID_OPERATION is generated.
The given fragment input generation state is loaded into the fragment
input variable location identified by /location/. This location
is a value returned either by GetProgramResourceLocation with a
/programInterface/ of FRAGMENT_INPUT_NV and a given fragment shader
input variable name or by GetProgramResourceiv with FRAGMENT_INPUT_NV
for the /programInterface/ and LOCATION for the property for a given
fragment input resource index.
....
glProgramPathFragmentInputGenNV will be used instead of glPathTexGen,
because the latter depends on fixed function pipeline that is not
exposed in ES.
Also add glGetProgramResourceLocation from OpenGL 4.3 or
ARB_program_interface_query.
Also add FRAGMENT_INPUT define to be used with glGetProgramResourceLocation.
The added functions are not used yet, but they're needed when implementing
NV_path_rendering support for OpenGL ES. They can also be used on OpenGL.
Remove uncalled NV_path_rendering functions, so they do not cause confusion
or take space in the interface definition. The ones that are later used
can be re-added when needed.
Remove definitions NV_path_rendering that are for NV_path_rendering function
parameters that are not used. The ones that are later used
can be re-added when needed.
R=bsalomon@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/
345723002
kkinnunen [Mon, 23 Jun 2014 05:56:53 +0000 (22:56 -0700)]
Support using OpenGL ES context on desktop
Support using OpenGL ES context on desktop for unix and Android platforms. This
is mainly useful in development.
Add --gpuAPI flag to gm, dm, bench, bench_pictures and render_pictures. The
possible parameters for the flag are "gl" and "gles".
R=bsalomon@google.com, mtklein@google.com, robertphillips@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/
319043005
borenet [Mon, 23 Jun 2014 05:18:34 +0000 (22:18 -0700)]
Update SKP version to 29
Automatic commit by the RecreateSKPs bot.
TBR=
Author: borenet@google.com
Review URL: https://codereview.chromium.org/
352473002
kkinnunen [Mon, 23 Jun 2014 05:18:14 +0000 (22:18 -0700)]
Fix SkPaint::measureText for stroked hairline text
SkPaint::measureText and text drawing used different criteria for
determining whether text should be drawn as paths or not.
Adds tests glyph_pos_(h/n)_(s/f/b) to test the text rendering and the glyph
positioning in the rendering. Mainly added in order to define what is the
expected text rendering when hairline stroke is used with various transform
options.
The testcase also tries to note or highlight the fact that SkPaint::measureText
is not expected to produce intuitively matching results when compared to a
rendering, if the rendering is done so that the device ends up having a device
transform.
This fixes the glyph_pos_h_s (hairline, stroked) test-case.
Ignore shadertext2_pdf-poppler.png gm on
Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug temporarily, as that fails.
R=jvanverth@google.com, reed@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/
335603003
tfarina [Sun, 22 Jun 2014 23:13:00 +0000 (16:13 -0700)]
No need to include ../tools/flags in include_dirs when depending on flags target.
"flags" target does it by direct_dependent_settings which exports the
include_dirs to targets that depend on it.
Along the way fixed the indentation of experimental.gyp and v8.gyp.
BUG=None
TEST=make all
R=mtklein@google.com
Author: tfarina@chromium.org
Review URL: https://codereview.chromium.org/
343283002
borenet [Sun, 22 Jun 2014 06:26:40 +0000 (23:26 -0700)]
Update SKP version to 28
Automatic commit by the RecreateSKPs bot.
TBR=
Author: borenet@google.com
Review URL: https://codereview.chromium.org/
345933004
tfarina [Sat, 21 Jun 2014 17:54:17 +0000 (10:54 -0700)]
Add GYP target for sk_tool_utils.* component.
This declares a static library target in gyp/sk_tool_utils.gyp, so other
targets can depend directly on it instead of including the source file
in their source lists.
BUG=None
TEST=make all
R=mtklein@google.com
Author: tfarina@chromium.org
Review URL: https://codereview.chromium.org/
348623006
borenet [Sat, 21 Jun 2014 06:51:47 +0000 (23:51 -0700)]
Update SKP version to 27
Automatic commit by the RecreateSKPs bot.
TBR=
Author: borenet@google.com
Review URL: https://codereview.chromium.org/
348183003
senorblanco [Fri, 20 Jun 2014 22:41:59 +0000 (15:41 -0700)]
Re-land "Fix external SkImageFilter caching with clips."
This reverts commit
9efd66b8451f25465abd1027e09a3bcfa7b9c554.
R=reed@google.com
TBR=reed@google.com
BUG=skia:
Author: senorblanco@chromium.org
Review URL: https://codereview.chromium.org/
348903004
reed [Fri, 20 Jun 2014 20:59:15 +0000 (13:59 -0700)]
speed up rgn building by inlining memcmp for 32bit values
on mac/clang, using circularclips gm/bench
- before: 400ms
- after: 250ms
BUG=skia:
R=tomhudson@chromium.org, mtklein@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/
348143002
krajcevski [Fri, 20 Jun 2014 20:07:15 +0000 (13:07 -0700)]
Rebaseline clip on Win7 ShuttleA HD2000
BUG=skia:
R=bsalomon@google.com
TBR=bsalomon@google.com
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/
342403002
george [Fri, 20 Jun 2014 19:03:35 +0000 (12:03 -0700)]
Fix SkBlitRow_opts_arm so that it works on ARM v4t.
Original Mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=901208
R=reed@google.com, mtklein@google.com, reed1
BUG=skia:
Author: george@mozilla.com
Review URL: https://codereview.chromium.org/
337853003
george [Fri, 20 Jun 2014 19:01:06 +0000 (12:01 -0700)]
Add some missing header include guards
BUG=skia:
R=reed@google.com, bsalomon@google.com, tfarina@chromium.org
Author: george@mozilla.com
Review URL: https://codereview.chromium.org/
325843002
krajcevski [Fri, 20 Jun 2014 18:43:00 +0000 (11:43 -0700)]
Some improvements to LATC compression
R=bsalomon@google.com
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/
347673002
Ben Wagner [Fri, 20 Jun 2014 18:41:35 +0000 (14:41 -0400)]
Rebaselines for DirectWrite non-rounding.
Review URL: https://codereview.chromium.org/
337923004
krajcevski [Fri, 20 Jun 2014 18:39:26 +0000 (11:39 -0700)]
Restore bug numbers
BUG=skia:
R=bsalomon@google.com
TBR=bsalomon@google.com
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/
341313002
reed [Fri, 20 Jun 2014 18:33:59 +0000 (11:33 -0700)]
optimize circularclips to act as a bench, fix null-check bug in etcbench
BUG=skia:
R=krajcevski@google.com, rmistry@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/
345183003
mtklein [Fri, 20 Jun 2014 18:29:20 +0000 (11:29 -0700)]
Move BenchTimer to tools as Timer
This breaks a bunch of circular dependencies between tools and gm and bench.
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/
4ed75287aed6371c6e4a41ffcc78c8a49c9810ed
CQ_EXTRA_TRYBOTS=tryserver.skia:Build-Mac10.7-Clang-Arm7-Debug-iOS-Trybot,Test-Ubuntu12-ShuttleA-GTX660-x86-Debug-Trybot
R=tfarina@chromium.org, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/
344213003
halcanary [Fri, 20 Jun 2014 18:28:37 +0000 (11:28 -0700)]
Use SkMutex::assertHeld in SkPDFFont and SkPDFShader.
R=mtklein@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/
348113002
mtklein [Fri, 20 Jun 2014 17:43:07 +0000 (10:43 -0700)]
Revert of Move BenchTimer to tools as Timer (https://codereview.chromium.org/
344213003/)
Reason for revert:
GpuTimer broken
Original issue's description:
> Move BenchTimer to tools as Timer
>
> This breaks a bunch of circular dependencies between tools and gm and bench.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/
4ed75287aed6371c6e4a41ffcc78c8a49c9810ed
R=tfarina@chromium.org, mtklein@chromium.org
TBR=mtklein@chromium.org, tfarina@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: mtklein@google.com
Review URL: https://codereview.chromium.org/
346753003
bungeman [Fri, 20 Jun 2014 17:35:00 +0000 (10:35 -0700)]
DirectWrite to not round already subpixel metrics.
In keeping with the FreeType and Mac scaler contexts, do not artificially
round already subpixel metrics.
The subpixel flag should be the 'forceSubpixel' flag when it comes to
metrics. Existing backends will give subpixel metrics when 'subpixel' is
requested, but will not round proper metrics when 'subpixel' is not
requested.
R=reed@google.com
Author: bungeman@google.com
Review URL: https://codereview.chromium.org/
344253002
mtklein [Fri, 20 Jun 2014 17:31:48 +0000 (10:31 -0700)]
Move BenchTimer to tools as Timer
This breaks a bunch of circular dependencies between tools and gm and bench.
BUG=skia:
R=tfarina@chromium.org, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/
344213003
sheyang [Fri, 20 Jun 2014 16:39:15 +0000 (09:39 -0700)]
Add Project to skia
BUG=374398
R=reed@google.com, bsalomon@google.com, rmistry@google.com, borenet@google.com
Author: sheyang@chromium.org
Review URL: https://codereview.chromium.org/
346853004
halcanary [Fri, 20 Jun 2014 16:05:56 +0000 (09:05 -0700)]
In Debug, SkMutex(pthread) crashes on re-entrant aquire from same thread.
R=mtklein@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/
338973006
krajcevski [Fri, 20 Jun 2014 16:02:15 +0000 (09:02 -0700)]
Rebaseline after dithering change
TBR=bsalomon@google.com
BUG=skia:
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/
347103003
halcanary [Fri, 20 Jun 2014 15:26:23 +0000 (08:26 -0700)]
CrashHandler calls strsignal on linux
R=mtklein@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/
349623004
mtklein [Fri, 20 Jun 2014 15:24:56 +0000 (08:24 -0700)]
undefok -> bool
BUG=skia:
not waiting for (dead?) win builder
NOTRY=True
R=reed@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/
348063002