Commit Graph

19707 Commits

Author SHA1 Message Date
kkinnunen
f15246320c Include conic weights in GrPath cache kSimpleVolatilePathDomain keys
Include conic weights in the keys when caching GrPath in
kSimpleVolatilePathDomain.

BUG=skia:4580

Review URL: https://codereview.chromium.org/1472733002
2015-11-26 01:51:44 -08:00
senorblanco
8444913d2c Don't use SkRect::MakeLargest() for clip bounds in image filter tests.
Much of the Skia code dealing with clip bounds does not handle
overflow, so if we start doing any math on these rects, the code will
break. Use explicit reasonable values instead.

BUG=skia:

Review URL: https://codereview.chromium.org/1479563002
2015-11-25 10:32:18 -08:00
senorblanco
4a24398391 Fix SkMergeImageFilter crop rect computation.
The crop rect should be applied to the union of the input bounds, not
to the src input's bounds. These are often the same, since the saveLayer
offscreen size is computed as the union of all the required bounds, but
is not correct if the input primitive is not used (e.g., if all inputs
are connected to SkImageSources). But this will change as we
move to more accurate intermediate bounds computations (getting rid of the join() hacks as described in skbug.com/3194).

Since we can't know this without actually processing the inputs,
split SkMergeImageFilter processing into:

- filter all inputs
- applyCropRect to the union'ed bounds
- allocate the destination
- do the merge

BUG=3194

Review URL: https://codereview.chromium.org/1475793002
2015-11-25 07:06:55 -08:00
msarett
43432f333a Add frame_larger_than_image.gif to blacklist
BUG=skia:

Review URL: https://codereview.chromium.org/1471373003
2015-11-25 05:36:07 -08:00
halcanary
8b6ab36940 tools/git-sync-deps: handle changing origin
TBR=mtklein@google.com

Review URL: https://codereview.chromium.org/1475513004
2015-11-24 13:10:52 -08:00
herb
11a7f7f599 Remove SkDrawProcs
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1476563002
2015-11-24 12:41:01 -08:00
ethannicholas
ff2103200b New API for computing optimization invariants.
Review URL: https://codereview.chromium.org/1467553002
2015-11-24 12:10:10 -08:00
reed
6868c3fccf optimize the disable-caching case for SkImage::readPixels
If the client wants no caching, and we haven't already cached it, pass the
caller's dst-buffer directly down to the generator, avoiding the (previous)
extra memcpy.

BUG=skia:4594

Review URL: https://codereview.chromium.org/1473373002
2015-11-24 11:44:47 -08:00
borenet
ca3e2400af Whitespace change to trigger bots after gsutil change
TBR=rmistry
BUG=556703

Review URL: https://codereview.chromium.org/1471373002
2015-11-24 11:36:09 -08:00
robertphillips
39f0538178 Add sniff for rect, oval & rrect to SkCanvas::clipPath
Review URL: https://codereview.chromium.org/1466303004
2015-11-24 09:30:13 -08:00
cdalton
baf8fcbb1b Add offscreen mode to visualbench
Replaces "nvpr mode" with "offscreen mode" and a flag to enable/
disable nvpr. Assigns new config names to the various combinations of
flags and begins printing them with the bench results in order to match
nanobench.

BUG=skia:

Review URL: https://codereview.chromium.org/1473253002
2015-11-24 09:20:24 -08:00
cdalton
0f6cca8a20 Optimize visualbench offscreen blits
Modifies NvprWrappedBenchmark to present its offscreen canvas via
GrContext::copySurface rather than going through the SkCanvas API.
Only copies a subrectangle the size of the benchmark, not the entire
canvas.

BUG=skia:

Review URL: https://codereview.chromium.org/1443263002
2015-11-24 08:54:30 -08:00
herb
bda26436fa Change XPS to use find and place glyph.
Testing:
The testing I did is non-standard. I just compared images using XPS viewer.
They all looked the same, but the XPS device is suffering from bit rot.

BUG=skia:

Review URL: https://codereview.chromium.org/1471043002
2015-11-24 08:37:02 -08:00
robertphillips
ff55b49c29 Sniff out rects, ovals & rrects in SkGpuDevice::drawPath
Review URL: https://codereview.chromium.org/1468423002
2015-11-24 07:56:59 -08:00
kkinnunen
7b94c1479f Generate list of GPU contexts outside ImageTest tests
Use DEF_GPUTEST_FOR_*_CONTEXT macros to obtain the
test GPU context.

Makes changing the context -related classes easier,
since not all tests need to be changed.

BUG=skia:2992

Review URL: https://codereview.chromium.org/1454663002
2015-11-24 07:39:40 -08:00
msarett
5c2cbf23bb Cherry pick one more commit into libjpeg-turbo
I forgot to add the last fix for the skip scanlines patch.

BUG=skia:

Review URL: https://codereview.chromium.org/1476483002
2015-11-24 07:14:35 -08:00
robertphillips
3d2e65439e Upgrade debugger to print more SkPath info (isOval & isRRect)
Review URL: https://codereview.chromium.org/1470063002
2015-11-24 06:34:50 -08:00
hendrikw
4870e6d4c9 skia: Holding onto the image in the benchmark causes issues
Skia'a nanobench can hold onto an image, that causes the lifetime
of GrGLGpu to extend past that of the GL interface.

Kill reference to surface and image before killing the interface

Review URL: https://codereview.chromium.org/1472433002
2015-11-24 05:50:23 -08:00
robertphillips
514450cb69 Clarify when oval & rrects get devolved to paths in SkGpuDevice/GrDrawContext boundary
The GrDrawContext drawOval and drawRRect methods are only called from SkGpuDevice so there is no value in delaying the conversion to a path when dashing is involved.

Review URL: https://codereview.chromium.org/1470103002
2015-11-24 05:36:02 -08:00
mtklein
b68ce74bd1 Add SK_BEGIN_REQUIRE_DENSE / SK_END_REQUIRE_DENSE.
Use in on a few examples of things we hash.

BUG=skia:

Review URL: https://codereview.chromium.org/1468483002
2015-11-24 05:35:58 -08:00
Derek Sollenberger
d14c39eff2 Whitespace change to trigger android automerger
Review URL: https://codereview.chromium.org/1473233002 .
2015-11-24 08:32:36 -05:00
egdaniel
0a0605d4de Appeasing the compilers
NOTRY=True
NOTREECHECKS=True

TBR=robertphillips@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/1471143002
2015-11-23 15:29:36 -08:00
egdaniel
813351f505 Fix for recent SrcOver XP Change
NOTREECHECKS=True
NOTRY=True

BUG=skia:

Review URL: https://codereview.chromium.org/1473443004
2015-11-23 15:12:23 -08:00
bsalomon
bf07455533 Make stencil and cover path rendering have more reasonable bounds.
BUG=skia:

Review URL: https://codereview.chromium.org/1471883002
2015-11-23 14:25:20 -08:00
joshualitt
50aa15b88a Remove unecessary GetGlyphIdMetrics call
BUG=skia:

Review URL: https://codereview.chromium.org/1467133003
2015-11-23 14:09:55 -08:00
joshualitt
898e02e175 Move command line print above parse in VisualBench
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1467383003
2015-11-23 13:57:46 -08:00
egdaniel
c4b72720e7 Don't create a GXPFactory when blend is SrcOver
BUG=skia:

Review URL: https://codereview.chromium.org/1471053002
2015-11-23 13:20:42 -08:00
joshualitt
60ce86d471 Move GrAtlasTextBatch blob regeneration to template
This will remove the runtime branches.  I don't think it makes the
code any harder to read either

BUG=skia:

Review URL: https://codereview.chromium.org/1466333003
2015-11-23 13:08:22 -08:00
reed
095530389d scaling API on SkPixmap
BUG=skia:4481

Review URL: https://codereview.chromium.org/1463373002
2015-11-23 12:32:16 -08:00
jvanverth
512e437e1e Add stroking support to distance field path renderer
Also slightly increases sizes of paths accepted for distance field
caching.

Committed: https://skia.googlesource.com/skia/+/5ce76efd1c847308c7bcac17bd87d567c42cd786

Committed: https://skia.googlesource.com/skia/+/73ee6770260dbeeabc4a78eee4f13533f0031211

Review URL: https://codereview.chromium.org/1460873002
2015-11-23 11:50:02 -08:00
bsalomon
db4758c75f Restrict query bounds for reduce clip to dev bounds
Review URL: https://codereview.chromium.org/1467253002
2015-11-23 11:14:20 -08:00
msarett
266f24aa94 Switch Skia's libjpeg-turbo to 1.4.2
The Android security team wants Android to be on the latest version
of libjpeg-turbo, so Skia should test on this version as well.

This shouldn't affect Gold.

I wouldn't be surprised if this causes a few ASAN/valgrind issues
that we need to fix.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/8e8eda9d4d2e6e65e3339eaaaf8144a4ef6c721c

Review URL: https://codereview.chromium.org/1469553002
2015-11-23 11:09:14 -08:00
lsalzman
b8b479b29d use malloc/calloc/free instead of moz_malloc/moz_calloc/moz_free in ports/SkMemory_mozalloc.cpp
BUG=skia:4560

Review URL: https://codereview.chromium.org/1449093002
2015-11-23 10:30:14 -08:00
mtklein
dfd7d48ced Revert of skstd -> std for unique_ptr (patchset #16 id:300001 of https://codereview.chromium.org/1436033003/ )
Reason for revert:
Perf-Mac10.9-Clang-MacMini6.2-CPU-AVX-x86_64-Release has not updated yet.

Original issue's description:
> skstd -> std for unique_ptr
>
> TBR=reed@google.com
> No public API changes.
>
> BUG=skia:4564
>
> Committed: https://skia.googlesource.com/skia/+/755c553c17b82bb5de3d9cc8d3b2a866ff9e9e50
>
> CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot,Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/06189155d987db5c7e69015f6ea87c2168d6a065

TBR=bungeman@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4564

Review URL: https://codereview.chromium.org/1467333002
2015-11-23 09:19:37 -08:00
mtklein
06189155d9 skstd -> std for unique_ptr
TBR=reed@google.com
No public API changes.

BUG=skia:4564

Committed: https://skia.googlesource.com/skia/+/755c553c17b82bb5de3d9cc8d3b2a866ff9e9e50

CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot,Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link-Trybot

Review URL: https://codereview.chromium.org/1436033003
2015-11-23 09:12:31 -08:00
robertphillips
125f19a296 Avoid devolving to a path when conservative clipping with RRects
Review URL: https://codereview.chromium.org/1461923004
2015-11-23 09:00:05 -08:00
fmalita
2b46913c99 Take span len into account when determining whether gradient is vertical
R=reed@google.com

Review URL: https://codereview.chromium.org/1471753004
2015-11-23 08:30:23 -08:00
scroggo
cf98fa9311 Add SkPngChunkReader.
This class allows a client of SkCodec to read chunks in the data
stream that are not recognized by libpng. This is used by Android
to specify ninepatch data.

Taken from SkImageDecoder::Peeker. Modify the name of the class
and its method to be more specific to their use. Make
SkImageDecoder::Peeker a subclass of the new class, to help stage
the change in Android.

Add a test to verify that it works.

BUG=skia:4574
BUG=skia:3257

Committed: https://skia.googlesource.com/skia/+/3389e00136188800b98ca69488c0418c374fd78b

Review URL: https://codereview.chromium.org/1040453002
2015-11-23 08:14:40 -08:00
scroggo
93c69fff53 Revert of Add SkPngChunkReader. (patchset #9 id:160001 of https://codereview.chromium.org/1040453002/ )
Reason for revert:
Busted Chromium builds:

../../third_party/skia/src/ports/SkImageDecoder_empty.cpp:63:17: error: no type
named 'Peeker' in 'SkImageDecoder'
SkImageDecoder::Peeker* SkImageDecoder::setPeeker(Peeker*) {
~~~~~~~~~~~~~~~~^
../../third_party/skia/src/ports/SkImageDecoder_empty.cpp:63:51: error: unknown
type name 'Peeker'
SkImageDecoder::Peeker* SkImageDecoder::setPeeker(Peeker*) {

Original issue's description:
> Add SkPngChunkReader.
>
> This class allows a client of SkCodec to read chunks in the data
> stream that are not recognized by libpng. This is used by Android
> to specify ninepatch data.
>
> Taken from SkImageDecoder::Peeker. Modify the name of the class
> and its method to be more specific to their use. Make
> SkImageDecoder::Peeker a subclass of the new class, to help stage
> the change in Android.
>
> Add a test to verify that it works.
>
> BUG=skia:4574
> BUG=skia:3257
>
> Committed: https://skia.googlesource.com/skia/+/3389e00136188800b98ca69488c0418c374fd78b

TBR=djsollen@google.com,reed@google.com,msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4574

Review URL: https://codereview.chromium.org/1472863003
2015-11-23 07:56:39 -08:00
msarett
4b9596109a Revert of Switch Skia's libjpeg-turbo to 1.4.2 (patchset #2 id:160001 of https://codereview.chromium.org/1469553002/ )
Reason for revert:
Breaking jpeg decodes everywhere.  I need to look into this.

Original issue's description:
> Switch Skia's libjpeg-turbo to 1.4.2
>
> The Android security team wants Android to be on the latest version
> of libjpeg-turbo, so Skia should test on this version as well.
>
> This shouldn't affect Gold.
>
> I wouldn't be surprised if this causes a few ASAN/valgrind issues
> that we need to fix.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/8e8eda9d4d2e6e65e3339eaaaf8144a4ef6c721c

TBR=scroggo@google.com,djsollen@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1468073002
2015-11-23 07:25:53 -08:00
scroggo
3389e00136 Add SkPngChunkReader.
This class allows a client of SkCodec to read chunks in the data
stream that are not recognized by libpng. This is used by Android
to specify ninepatch data.

Taken from SkImageDecoder::Peeker. Modify the name of the class
and its method to be more specific to their use. Make
SkImageDecoder::Peeker a subclass of the new class, to help stage
the change in Android.

Add a test to verify that it works.

BUG=skia:4574
BUG=skia:3257

Review URL: https://codereview.chromium.org/1040453002
2015-11-23 07:20:57 -08:00
bsalomon
a98419be09 Review URL: https://codereview.chromium.org/1464593004 2015-11-23 07:09:50 -08:00
msarett
8e8eda9d4d Switch Skia's libjpeg-turbo to 1.4.2
The Android security team wants Android to be on the latest version
of libjpeg-turbo, so Skia should test on this version as well.

This shouldn't affect Gold.

I wouldn't be surprised if this causes a few ASAN/valgrind issues
that we need to fix.

BUG=skia:

Review URL: https://codereview.chromium.org/1469553002
2015-11-23 06:34:25 -08:00
kkinnunen
621895f5a5 Fix GLInterfaceValidation test after "Remove GrContextFactory::getGLContext"
Fix GLInterfaceValidation test crash after "Remove
GrContextFactory::getGLContext" commit.

Review URL: https://codereview.chromium.org/1464283002
2015-11-23 05:28:08 -08:00
kkinnunen
5931922997 Remove GrContextFactory::getGLContext
Remove GrContextFactory::getGLContext, it is problematic:

It has the bug of not checking for the context type.

It also is error-prone, since the GL context is not made
current, but it is callers may assume it is current.

It is also not used very much.

Clients can use GrContextFactory::getContextInfo.

BUG=skia:

Review URL: https://codereview.chromium.org/1455093003
2015-11-22 23:23:53 -08:00
bsalomon
7ea33f5e1a Initial version of external_oes texture support and unit test
Committed: https://skia.googlesource.com/skia/+/27a048700778d4cebfc23301d1780649791b0e03

Review URL: https://codereview.chromium.org/1451683002
2015-11-22 14:51:00 -08:00
reed
de3aac8cea use pinned value during lerp for vertical gradients
slight formatting clean up on associated gm

BUG=skia:

Review URL: https://codereview.chromium.org/1471543002
2015-11-22 13:00:04 -08:00
halcanary
70d1554d8e SkPDF: add final keyword to leaf classes
Review URL: https://codereview.chromium.org/1461403002
2015-11-22 12:55:04 -08:00
update-skps
218ccfc86b Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS

Review URL: https://codereview.chromium.org/1469693002
2015-11-22 12:54:57 -08:00
fmalita
08c4bdf305 Revert of Add stroking support to distance field path renderer (patchset #8 id:160001 of https://codereview.chromium.org/1460873002/ )
Reason for revert:
Valgrind failures:

http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind/builds/420/steps/dm/logs/stdio

==7062== Use of uninitialised value of size 8
==7062==    at 0x8ECA9A: AADistanceFieldPathBatch::onPrepareDraws(GrVertexBatch::Target*) (SkTDynamicHash.h:94)
==7062==    by 0x90DCF5: GrVertexBatch::onPrepare(GrBatchFlushState*) (GrVertexBatch.cpp:16)
==7062==    by 0x8B592A: GrDrawTarget::prepareBatches(GrBatchFlushState*) (GrBatch.h:100)
==7062==    by 0x8B51EA: GrDrawingManager::flush() (GrDrawingManager.cpp:78)
==7062==    by 0x8AE568: GrContext::flush(int) (GrContext.cpp:191)
==7062==    by 0x6C118A: GrContext::getTestTarget(GrTestTarget*, GrRenderTarget*) (GrTest.cpp:56)
==7062==    by 0x4F4D82: GrDrawingManager::ProgramUnitTest(GrContext*, int) (GLProgramsTest.cpp:360)
==7062==    by 0x4F58EC: test_GLPrograms(skiatest::Reporter*, GrContextFactory*) (GLProgramsTest.cpp:450)
==7062==    by 0x40925E: run_test(skiatest::Test*) (DM.cpp:1022)
==7062==    by 0x40BAC2: run_enclave_and_gpu_tests(SkTArray<Task, false>*) (DM.cpp:1033)
==7062==    by 0x7621A9: SkTaskGroup::wait() (SkTaskGroup.cpp:88)
==7062==    by 0x40B756: dm_main() (DM.cpp:1124)
==7062==    by 0x40BA5F: main (DM.cpp:1211)
==7062==  Uninitialised value was created by a stack allocation
==7062==    at 0x8DB484: GrTest::TestStrokeRec(SkRandom*) (GrTestUtils.cpp:232)
==7062==
{
   <insert_a_suppression_name_here>
   Memcheck:Value8
   fun:_ZN24AADistanceFieldPathBatch14onPrepareDrawsEPN13GrVertexBatch6TargetE
   fun:_ZN13GrVertexBatch9onPrepareEP17GrBatchFlushState
   fun:_ZN12GrDrawTarget14prepareBatchesEP17GrBatchFlushState
   fun:_ZN16GrDrawingManager5flushEv
   fun:_ZN9GrContext5flushEi
   fun:_ZN9GrContext13getTestTargetEP12GrTestTargetP14GrRenderTarget
   fun:_ZN16GrDrawingManager15ProgramUnitTestEP9GrContexti
   fun:_ZL15test_GLProgramsPN8skiatest8ReporterEP16GrContextFactory
   fun:_ZL8run_testPN8skiatest4TestE
   fun:_ZL25run_enclave_and_gpu_testsP8SkTArrayI4TaskLb0EE
   fun:_ZN11SkTaskGroup4waitEv
   fun:_Z7dm_mainv
   fun:main
}

Original issue's description:
> Add stroking support to distance field path renderer
>
> Also slightly increases sizes of paths accepted for distance field
> caching.
>
> Committed: https://skia.googlesource.com/skia/+/5ce76efd1c847308c7bcac17bd87d567c42cd786
>
> Committed: https://skia.googlesource.com/skia/+/73ee6770260dbeeabc4a78eee4f13533f0031211

TBR=robertphillips@google.com,jvanverth@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1465053002
2015-11-22 08:45:13 -08:00