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
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
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
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
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
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
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
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
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
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/+/3389e00136188800b98ca69488c0418c374fd78bTBR=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
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/+/8e8eda9d4d2e6e65e3339eaaaf8144a4ef6c721cTBR=scroggo@google.com,djsollen@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1468073002
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
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
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
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/+/73ee6770260dbeeabc4a78eee4f13533f0031211TBR=robertphillips@google.com,jvanverth@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1465053002