Commit Graph

2948 Commits

Author SHA1 Message Date
Robert Phillips
ac6b1fa2c8 Remove budgeted parameter from SkSurface::makeImageSnapshot (take 2)
This unused feature complicates MDB.

Chrome compiles locally for me with this CL.
frameworks/base/libs/hwui compiles locally for me with this CL.

Change-Id: Id3ad64dac72eace52855896df0d7ce3679f15884
Reviewed-on: https://skia-review.googlesource.com/9882
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-20 13:50:35 +00:00
Mike Klein
919cc4562c Revert "Revert "Add color spin test for SkColorSpaceXformCanvas""
This reverts commit 73e21af213.

Reason for revert: I will fix the broken bot next week.

Original change's description:
> Revert "Add color spin test for SkColorSpaceXformCanvas"
> 
> This reverts commit cb01aec63b.
> 
> Reason for revert: Breaks Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE
> 
> Original change's description:
> > Add color spin test for SkColorSpaceXformCanvas
> > 
> > Also changes behavior to treat nullptr srcs as sRGB.
> > 
> > Testing locally, it looks like 353 gms have no diffs from 8888.
> > There are 269 diffs - some are fine (gms that do color space stuff)
> > and some are bugs.
> > 
> > BUG=skia:
> > 
> > Change-Id: I55c2825f4f4b857e0b0a0ec050c6db82ac881492
> > Reviewed-on: https://skia-review.googlesource.com/9738
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Matt Sarett <msarett@google.com>
> > 
> 
> TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reviews@skia.org
> # Not skipping CQ checks because original CL landed > 1 day ago.
> BUG=skia:
> 
> Change-Id: I70bb69f747b863d267494e37a60888a51ab0184c
> Reviewed-on: https://skia-review.googlesource.com/9823
> Reviewed-by: Eric Boren <borenet@google.com>
> Commit-Queue: Eric Boren <borenet@google.com>
> 

TBR=borenet@google.com,mtklein@google.com,msarett@google.com,reviews@skia.org,brianosman@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
BUG=skia:

Change-Id: I766382e6655f614042cded84f547f9fd5b109fca
Reviewed-on: https://skia-review.googlesource.com/9879
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-03-18 15:55:38 +00:00
Yuqian Li
06ee8e8a3e Revert "Revert "Revert "Remove budgeted parameter from SkSurface::makeImageSnapshot"""
This reverts commit 31249bb2df.

Reason for revert: Android build is still broken as shown below.

out/target/product/bullhead/obj/NATIVE_TESTS/hwui_unit_tests_intermediates/tests/unit/SkiaPipelineTests.o frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp"
frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp:211:51: error: non-virtual member function marked 'override' hides virtual member function
    sk_sp<SkImage> onNewImageSnapshot(SkBudgeted) override {
                                                  ^
external/skia/src/image/SkSurface_Base.h:46:28: note: hidden overloaded virtual function 'SkSurface_Base::onNewImageSnapshot' declared here: different number of parameters (0 vs 1)
    virtual sk_sp<SkImage> onNewImageSnapshot() = 0;
                           ^
frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp:281:84: error: no viable conversion from 'sk_sp<DeferLayer<DeferTestCanvas>>' to 'sk_sp<SkSurface>'
    pipeline->renderFrame(layerUpdateQueue, dirty, nodes, true, contentDrawBounds, surface);
                                                                                   ^~~~~~~
external/skia/include/core/SkRefCnt.h:253:15: note: candidate constructor not viable: no known conversion from 'sk_sp<DeferLayer<DeferTestCanvas> >' to 'std::nullptr_t' (aka 'nullptr_t') for 1st argument
    constexpr sk_sp(std::nullptr_t) : fPtr(nullptr) {}
              ^
external/skia/include/core/SkRefCnt.h:259:5: note: candidate constructor not viable: no known conversion from 'sk_sp<DeferLayer<DeferTestCanvas> >' to 'const sk_sp<SkSurface> &' for 1st argument
    sk_sp(const sk_sp<T>& that) : fPtr(SkSafeRef(that.get())) {}
    ^
external/skia/include/core/SkRefCnt.h:268:5: note: candidate constructor not viable: no known conversion from 'sk_sp<DeferLayer<DeferTestCanvas> >' to 'sk_sp<SkSurface> &&' for 1st argument
    sk_sp(sk_sp<T>&& that) : fPtr(that.release()) {}
    ^
external/skia/include/gpu/../private/SkTLogic.h:27:82: note: candidate template ignored: disabled by 'enable_if' [with U = (anonymous namespace)::DeferLayer<DeferTestCanvas>]
template <bool B, typename T = void> using enable_if_t = typename std::enable_if<B, T>::type;
                                                                                 ^
external/skia/include/gpu/../private/SkTLogic.h:27:82: note: candidate template ignored: disabled by 'enable_if' [with U = (anonymous namespace)::DeferLayer<DeferTestCanvas>]
external/skia/include/core/SkRefCnt.h:327:5: note: candidate function
    operator unspecified_bool_type() const { return this->get() ? &sk_sp::fPtr : nullptr; }
    ^
frameworks/base/libs/hwui/pipeline/skia/SkiaPipeline.h:50:30: note: passing argument to parameter 'surface' here
            sk_sp<SkSurface> surface);
                             ^
frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp:312:58: error: no viable conversion from 'sk_sp<DeferLayer<ClippedTestCanvas>>' to 'sk_sp<SkSurface>'
            SkRect::MakeWH(CANVAS_WIDTH, CANVAS_HEIGHT), surface);
                                                         ^~~~~~~
external/skia/include/core/SkRefCnt.h:253:15: note: candidate constructor not viable: no known conversion from 'sk_sp<DeferLayer<ClippedTestCanvas> >' to 'std::nullptr_t' (aka 'nullptr_t') for 1st argument
    constexpr sk_sp(std::nullptr_t) : fPtr(nullptr) {}
              ^
external/skia/include/core/SkRefCnt.h:259:5: note: candidate constructor not viable: no known conversion from 'sk_sp<DeferLayer<ClippedTestCanvas> >' to 'const sk_sp<SkSurface> &' for 1st argument
    sk_sp(const sk_sp<T>& that) : fPtr(SkSafeRef(that.get())) {}
    ^
external/skia/include/core/SkRefCnt.h:268:5: note: candidate constructor not viable: no known conversion from 'sk_sp<DeferLayer<ClippedTestCanvas> >' to 'sk_sp<SkSurface> &&' for 1st argument
    sk_sp(sk_sp<T>&& that) : fPtr(that.release()) {}
    ^
external/skia/include/gpu/../private/SkTLogic.h:27:82: note: candidate template ignored: disabled by 'enable_if' [with U = (anonymous namespace)::DeferLayer<ClippedTestCanvas>]
template <bool B, typename T = void> using enable_if_t = typename std::enable_if<B, T>::type;
                                                                                 ^
external/skia/include/gpu/../private/SkTLogic.h:27:82: note: candidate template ignored: disabled by 'enable_if' [with U = (anonymous namespace)::DeferLayer<ClippedTestCanvas>]
external/skia/include/core/SkRefCnt.h:327:5: note: candidate function
    operator unspecified_bool_type() const { return this->get() ? &sk_sp::fPtr : nullptr; }
    ^
frameworks/base/libs/hwui/pipeline/skia/SkiaPipeline.h:50:30: note: passing argument to parameter 'surface' here
            sk_sp<SkSurface> surface);
                             ^
frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp:343:58: error: no viable conversion from 'sk_sp<DeferLayer<ClipReplaceTestCanvas>>' to 'sk_sp<SkSurface>'
            SkRect::MakeWH(CANVAS_WIDTH, CANVAS_HEIGHT), surface);
                                                         ^~~~~~~
external/skia/include/core/SkRefCnt.h:253:15: note: candidate constructor not viable: no known conversion from 'sk_sp<DeferLayer<ClipReplaceTestCanvas> >' to 'std::nullptr_t' (aka 'nullptr_t') for 1st argument
    constexpr sk_sp(std::nullptr_t) : fPtr(nullptr) {}
              ^
external/skia/include/core/SkRefCnt.h:259:5: note: candidate constructor not viable: no known conversion from 'sk_sp<DeferLayer<ClipReplaceTestCanvas> >' to 'const sk_sp<SkSurface> &' for 1st argument
    sk_sp(const sk_sp<T>& that) : fPtr(SkSafeRef(that.get())) {}
    ^
external/skia/include/core/SkRefCnt.h:268:5: note: candidate constructor not viable: no known conversion from 'sk_sp<DeferLayer<ClipReplaceTestCanvas> >' to 'sk_sp<SkSurface> &&' for 1st argument
    sk_sp(sk_sp<T>&& that) : fPtr(that.release()) {}
    ^
external/skia/include/gpu/../private/SkTLogic.h:27:82: note: candidate template ignored: disabled by 'enable_if' [with U = (anonymous namespace)::DeferLayer<ClipReplaceTestCanvas>]
template <bool B, typename T = void> using enable_if_t = typename std::enable_if<B, T>::type;
                                                                                 ^
external/skia/include/gpu/../private/SkTLogic.h:27:82: note: candidate template ignored: disabled by 'enable_if' [with U = (anonymous namespace)::DeferLayer<ClipReplaceTestCanvas>]
external/skia/include/core/SkRefCnt.h:327:5: note: candidate function
    operator unspecified_bool_type() const { return this->get() ? &sk_sp::fPtr : nullptr; }
    ^
frameworks/base/libs/hwui/pipeline/skia/SkiaPipeline.h:50:30: note: passing argument to parameter 'surface' here
            sk_sp<SkSurface> surface);
                             ^
frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp:214:42: error: cannot initialize object parameter of type 'SkSurface' with an expression of type '(anonymous namespace)::DeferLayer<DeferTestCanvas>'
    T* canvas() { return static_cast<T*>(getCanvas()); }
                                         ^~~~~~~~~
frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp:282:27: note: in instantiation of member function '(anonymous namespace)::DeferLayer<DeferTestCanvas>::canvas' requested here
    EXPECT_EQ(4, surface->canvas()->mDrawCounter);
                          ^
frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp:214:42: error: cannot initialize object parameter of type 'SkSurface' with an expression of type '(anonymous namespace)::DeferLayer<ClippedTestCanvas>'
    T* canvas() { return static_cast<T*>(getCanvas()); }
                                         ^~~~~~~~~
frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp:313:27: note: in instantiation of member function '(anonymous namespace)::DeferLayer<ClippedTestCanvas>::canvas' requested here
    EXPECT_EQ(1, surface->canvas()->mDrawCounter);
                          ^
frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp:214:42: error: cannot initialize object parameter of type 'SkSurface' with an expression of type '(anonymous namespace)::DeferLayer<ClipReplaceTestCanvas>'
    T* canvas() { return static_cast<T*>(getCanvas()); }
                                         ^~~~~~~~~
frameworks/base/libs/hwui/tests/unit/SkiaPipelineTests.cpp:344:27: note: in instantiation of member function '(anonymous namespace)::DeferLayer<ClipReplaceTestCanvas>::canvas' requested here
    EXPECT_EQ(1, surface->canvas()->mDrawCounter);

Original change's description:
> Revert "Revert "Remove budgeted parameter from SkSurface::makeImageSnapshot""
> 
> This reverts commit 9e9188f84b.
> 
> Reason for revert: Android-side fix has landed
> 
> Original change's description:
> > Revert "Remove budgeted parameter from SkSurface::makeImageSnapshot"
> > 
> > This reverts commit b64bcbdc3a.
> > 
> > Reason for revert: 
> > 
> > Android build failed as shown below.
> > 
> > frameworks/base/libs/hwui/VkLayer.cpp:32:41: error: too many arguments to function call, expected 0, have 1
> >     mImage = surface->makeImageSnapshot(SkBudgeted::kNo);
> > 
> > Original change's description:
> > > Remove budgeted parameter from SkSurface::makeImageSnapshot
> > > 
> > > This unused feature complicates MDB.
> > > 
> > > Chrome compiles locally for me with this CL.
> > > 
> > > Change-Id: I611e464885fb984030eace43ead42cf39d0e7f72
> > > Reviewed-on: https://skia-review.googlesource.com/9734
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > Commit-Queue: Robert Phillips <robertphillips@google.com>
> > > 
> > 
> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > 
> > Change-Id: Iae6e313c15b2352bd0d4fc7b5629de0a51ac398e
> > Reviewed-on: https://skia-review.googlesource.com/9788
> > Reviewed-by: Yuqian Li <liyuqian@google.com>
> > Commit-Queue: Yuqian Li <liyuqian@google.com>
> > 
> 
> TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org,liyuqian@google.com
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Change-Id: If07d1b5db6e6c618d37445a0cf127780ed243a92
> Reviewed-on: https://skia-review.googlesource.com/9843
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org,liyuqian@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I674b0a9d4130e00164d2e0344a92c373cf70f4fd
Reviewed-on: https://skia-review.googlesource.com/9873
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-03-17 20:50:19 +00:00
Mike Reed
795c5ea657 don't use deprecated (raw) form of SkPatchUtils, delete duplicate util
deprecated API still used in android -- will fix (and then delete)

BUG=skia:6366

Change-Id: Icd87acc680f7c8ae66ac231cb5d254f5eb178008
Reviewed-on: https://skia-review.googlesource.com/9864
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-17 19:28:45 +00:00
Robert Phillips
31249bb2df Revert "Revert "Remove budgeted parameter from SkSurface::makeImageSnapshot""
This reverts commit 9e9188f84b.

Reason for revert: Android-side fix has landed

Original change's description:
> Revert "Remove budgeted parameter from SkSurface::makeImageSnapshot"
> 
> This reverts commit b64bcbdc3a.
> 
> Reason for revert: 
> 
> Android build failed as shown below.
> 
> frameworks/base/libs/hwui/VkLayer.cpp:32:41: error: too many arguments to function call, expected 0, have 1
>     mImage = surface->makeImageSnapshot(SkBudgeted::kNo);
> 
> Original change's description:
> > Remove budgeted parameter from SkSurface::makeImageSnapshot
> > 
> > This unused feature complicates MDB.
> > 
> > Chrome compiles locally for me with this CL.
> > 
> > Change-Id: I611e464885fb984030eace43ead42cf39d0e7f72
> > Reviewed-on: https://skia-review.googlesource.com/9734
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Robert Phillips <robertphillips@google.com>
> > 
> 
> TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> 
> Change-Id: Iae6e313c15b2352bd0d4fc7b5629de0a51ac398e
> Reviewed-on: https://skia-review.googlesource.com/9788
> Reviewed-by: Yuqian Li <liyuqian@google.com>
> Commit-Queue: Yuqian Li <liyuqian@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org,liyuqian@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: If07d1b5db6e6c618d37445a0cf127780ed243a92
Reviewed-on: https://skia-review.googlesource.com/9843
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-17 17:44:01 +00:00
Brian Salomon
d02b6f331b Make dstreadshuffle not crash in with --preAbandonGpuContext and look better in 565
BUG=skia:6386

Change-Id: I90578f57ba7076d65e6d8ebe61ec325ebba8e35d
Reviewed-on: https://skia-review.googlesource.com/9828
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-17 15:26:02 +00:00
Eric Boren
73e21af213 Revert "Add color spin test for SkColorSpaceXformCanvas"
This reverts commit cb01aec63b.

Reason for revert: Breaks Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE

Original change's description:
> Add color spin test for SkColorSpaceXformCanvas
> 
> Also changes behavior to treat nullptr srcs as sRGB.
> 
> Testing locally, it looks like 353 gms have no diffs from 8888.
> There are 269 diffs - some are fine (gms that do color space stuff)
> and some are bugs.
> 
> BUG=skia:
> 
> Change-Id: I55c2825f4f4b857e0b0a0ec050c6db82ac881492
> Reviewed-on: https://skia-review.googlesource.com/9738
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
> 

TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reviews@skia.org
# Not skipping CQ checks because original CL landed > 1 day ago.
BUG=skia:

Change-Id: I70bb69f747b863d267494e37a60888a51ab0184c
Reviewed-on: https://skia-review.googlesource.com/9823
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2017-03-17 11:52:14 +00:00
Mike Reed
5fa6645dbe remove unused VerticesFlags
Deferring removing the flags parameter from the virtuals until a
later CL (as it collides with another related CL)

BUG=skia:6366

Change-Id: I817fae3df03ecebe5ec3532f691ed06deab890e6
Reviewed-on: https://skia-review.googlesource.com/9739
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-16 20:08:50 +00:00
Mike Reed
aa9e3326f7 Revert[4] "store vertices arrays inline with object""""
This reverts commit 0c492cfe17.

BUG=skia:

Change-Id: I63bce834fee6dd6f043b3889ac4ec287dd03d2e6
Reviewed-on: https://skia-review.googlesource.com/9809
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-16 19:17:11 +00:00
Mike Reed
0c492cfe17 Revert[3] "store vertices arrays inline with object"""
This reverts commit 7d9f9e3020.

Reason for revert: speculative revert to try to fix google3

Original change's description:
> Revert[2] "store vertices arrays inline with object""
> 
> This reverts commit 9e62df6ecd.
> 
> Reason for revert: behavior in reader32 fixed
> 
> Fix is here: https://skia-review.googlesource.com/c/9729/
> 
> Original change's description:
> > Revert "store vertices arrays inline with object"
> > 
> > This reverts commit eaaebb19a1.
> > 
> > Reason for revert: may call SkReader32::read(null, 0) -- reader needs to handle this
> > 
> > Original change's description:
> > > store vertices arrays inline with object
> > > 
> > > Also unify some of naming (esp. around texCoords)
> > > 
> > > BUG=skia:6366
> > > 
> > > Change-Id: I5a6793f029cccf0cd0a2c1d180b259ce4eab526f
> > > Reviewed-on: https://skia-review.googlesource.com/9705
> > > Commit-Queue: Mike Reed <reed@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > 
> > 
> > TBR=bsalomon@google.com,reed@google.com,reviews@skia.org
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:6366
> > 
> > Change-Id: Ie421654bcd74d74f8be6676291e3d6e16e2a7a16
> > Reviewed-on: https://skia-review.googlesource.com/9727
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> > 
> 
> TBR=bsalomon@google.com,reviews@skia.org,reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:6366
> 
> Change-Id: I1f12108fff8f551d66455cfadd6d5dd9412e9aa8
> Reviewed-on: https://skia-review.googlesource.com/9760
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> 

TBR=bsalomon@google.com,reviews@skia.org,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6366

Change-Id: Ie23130a07fbecd5664e37291bc167008a6b496bc
Reviewed-on: https://skia-review.googlesource.com/9806
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-16 16:44:39 +00:00
Yuqian Li
9e9188f84b Revert "Remove budgeted parameter from SkSurface::makeImageSnapshot"
This reverts commit b64bcbdc3a.

Reason for revert: 

Android build failed as shown below.

frameworks/base/libs/hwui/VkLayer.cpp:32:41: error: too many arguments to function call, expected 0, have 1
    mImage = surface->makeImageSnapshot(SkBudgeted::kNo);

Original change's description:
> Remove budgeted parameter from SkSurface::makeImageSnapshot
> 
> This unused feature complicates MDB.
> 
> Chrome compiles locally for me with this CL.
> 
> Change-Id: I611e464885fb984030eace43ead42cf39d0e7f72
> Reviewed-on: https://skia-review.googlesource.com/9734
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Iae6e313c15b2352bd0d4fc7b5629de0a51ac398e
Reviewed-on: https://skia-review.googlesource.com/9788
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-03-16 15:05:04 +00:00
Robert Phillips
b64bcbdc3a Remove budgeted parameter from SkSurface::makeImageSnapshot
This unused feature complicates MDB.

Chrome compiles locally for me with this CL.

Change-Id: I611e464885fb984030eace43ead42cf39d0e7f72
Reviewed-on: https://skia-review.googlesource.com/9734
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-16 13:36:06 +00:00
Matt Sarett
cb01aec63b Add color spin test for SkColorSpaceXformCanvas
Also changes behavior to treat nullptr srcs as sRGB.

Testing locally, it looks like 353 gms have no diffs from 8888.
There are 269 diffs - some are fine (gms that do color space stuff)
and some are bugs.

BUG=skia:

Change-Id: I55c2825f4f4b857e0b0a0ec050c6db82ac881492
Reviewed-on: https://skia-review.googlesource.com/9738
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-03-15 21:17:18 +00:00
Brian Salomon
8336e949b8 Make dstreadshuffle GM more visually comprehensible
Change-Id: I1f42f474fb753e3dfbb574864f0279f139dce7e9
Reviewed-on: https://skia-review.googlesource.com/9732
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-03-15 20:55:11 +00:00
Mike Reed
7d9f9e3020 Revert[2] "store vertices arrays inline with object""
This reverts commit 9e62df6ecd.

Reason for revert: behavior in reader32 fixed

Fix is here: https://skia-review.googlesource.com/c/9729/

Original change's description:
> Revert "store vertices arrays inline with object"
> 
> This reverts commit eaaebb19a1.
> 
> Reason for revert: may call SkReader32::read(null, 0) -- reader needs to handle this
> 
> Original change's description:
> > store vertices arrays inline with object
> > 
> > Also unify some of naming (esp. around texCoords)
> > 
> > BUG=skia:6366
> > 
> > Change-Id: I5a6793f029cccf0cd0a2c1d180b259ce4eab526f
> > Reviewed-on: https://skia-review.googlesource.com/9705
> > Commit-Queue: Mike Reed <reed@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > 
> 
> TBR=bsalomon@google.com,reed@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:6366
> 
> Change-Id: Ie421654bcd74d74f8be6676291e3d6e16e2a7a16
> Reviewed-on: https://skia-review.googlesource.com/9727
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> 

TBR=bsalomon@google.com,reviews@skia.org,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6366

Change-Id: I1f12108fff8f551d66455cfadd6d5dd9412e9aa8
Reviewed-on: https://skia-review.googlesource.com/9760
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-15 18:35:18 +00:00
Mike Reed
9e62df6ecd Revert "store vertices arrays inline with object"
This reverts commit eaaebb19a1.

Reason for revert: may call SkReader32::read(null, 0) -- reader needs to handle this

Original change's description:
> store vertices arrays inline with object
> 
> Also unify some of naming (esp. around texCoords)
> 
> BUG=skia:6366
> 
> Change-Id: I5a6793f029cccf0cd0a2c1d180b259ce4eab526f
> Reviewed-on: https://skia-review.googlesource.com/9705
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

TBR=bsalomon@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6366

Change-Id: Ie421654bcd74d74f8be6676291e3d6e16e2a7a16
Reviewed-on: https://skia-review.googlesource.com/9727
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-15 17:32:48 +00:00
Brian Osman
d1e67e70ae Use SkBlendMode_Name rather than one-off tables
BUG=skia:

Change-Id: I653ff55bc1164ddae4b03967f2f54bb5fece5a33
Reviewed-on: https://skia-review.googlesource.com/9722
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-15 16:52:49 +00:00
Mike Reed
eaaebb19a1 store vertices arrays inline with object
Also unify some of naming (esp. around texCoords)

BUG=skia:6366

Change-Id: I5a6793f029cccf0cd0a2c1d180b259ce4eab526f
Reviewed-on: https://skia-review.googlesource.com/9705
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-15 16:46:53 +00:00
Robert Phillips
296b1ccf9b Retract GrContext from src/gpu/effects
Change-Id: Iceb7263098286bafb2605ef17d1fe6bb25d71e97
Reviewed-on: https://skia-review.googlesource.com/9693
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-15 15:20:40 +00:00
Robert Phillips
26c90e0479 Add GrRenderTargetContext::resourceProvider & GrResourceProvider::caps
and retract GrSurfaceContextPriv a bit

Change-Id: Id47af1052f9bda4fe7c85b3ce46b3ebe37797524
Reviewed-on: https://skia-review.googlesource.com/9647
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-14 21:23:44 +00:00
Brian Salomon
97180af7f5 Compute clipped draw bounds outside GrAppliedClip.
We will be storing GrAppliedClips alongside ops. The op already stores the
clipped bounds. If GrAppliedClip has draw bounds then as ops combine the
GrAppliedClip's bounds should be merged to be consistent. However, we won't
actually ever use those bounds again so it would be wasteful to merge them.

Change-Id: I4ef3010dc04761e256120a2e0e074bc3c6ff6ca1
Reviewed-on: https://skia-review.googlesource.com/9642
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2017-03-14 18:51:49 +00:00
Greg Daniel
8199d94c08 Generaly Fixes to gpu bezier code
BUG=skia:

Change-Id: I2246aa0b2bc3327df42ca30d35020a4b878a819b
Reviewed-on: https://skia-review.googlesource.com/9555
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2017-03-14 17:40:56 +00:00
Mike Reed
97eb4feb11 add SkVertices::Builder
Possible next iterations:
- remove another allocation use the SkData trick to share
  the object and its (trailing) data
- store a bit that tells use to free each pointer, allowing
  the builder to "adopt" some allocations instead of copy.

Larger idea:
- merge with drawPoints to have a single object for both.

BUG=skia:6366

Change-Id: Iec33239aa2ad5d00b36469ca0b88934ddf6f22eb
Reviewed-on: https://skia-review.googlesource.com/9604
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-14 16:57:49 +00:00
Brian Salomon
9a7677273a Remove origin from GrClipStackClip and GrWindowRectsState.
Change-Id: I993f426fee0f21cf1f529f58d242de3017253678
Reviewed-on: https://skia-review.googlesource.com/9623
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2017-03-13 22:01:06 +00:00
Robert Phillips
b726d58efc Partially defer SkImage_Gpu
One of SkImageCacherator, GrBitmapTextureMaker, GrImageTextureMaker, GrTextureAdjuster, GrTextureProducer or SkImage has to take the first step. This is probably the least odd of the options.

Change-Id: Ie167034553451f4b3633a5a1548dbd4d75839b3d
Reviewed-on: https://skia-review.googlesource.com/9488
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-10 15:02:11 +00:00
Brian Salomon
649a3411f9 Add a separate draw function to GrRenderTargetContext for GrMeshDrawOp derived classes.
The first phase of deferring GrPipeline creation until flush will apply only to GrDrawOp subclasses that do not derive from GrMeshDrawOp. This change prepares for that by creating separate draw functions on GrRenderTargetContext for GrMeshDrawOp-derived ops. This is temporary and will incrementally be undone as pipeline-creation deferral rolls out to the GrMeshDrawOps in a later phase of this work.


Change-Id: I0f5b71fe913f3273cfe9e965f7d8bbe7f01ad0ef
Reviewed-on: https://skia-review.googlesource.com/9481
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-03-09 19:26:13 +00:00
Brian Osman
3b65598bce Make SkGr.h private and remove unused functions
BUG=skia:

Change-Id: I6699d00c5412ed9d9bf14b032a08b06b1c766bce
Reviewed-on: https://skia-review.googlesource.com/9398
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-03-08 20:55:21 +00:00
Mike Reed
598524df99 clip to elements directly, no need for replay indirection
allows us to remove SkCanvas::replayClips in future CL

BUG=skia:

Change-Id: I20c3700c8a331b4988fc1332702ff0e0565e94bc
Reviewed-on: https://skia-review.googlesource.com/9417
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-08 18:57:54 +00:00
Matt Sarett
35b8b26eee Add gm to compare premuls in dst vs. src color space
BUG=skia:

Change-Id: I36755f4bbc405a8af12990573e1f554df012b30a
Reviewed-on: https://skia-review.googlesource.com/9402
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-03-08 17:07:59 +00:00
Mike Reed
a1361364e6 Revert[6] "Remove SkDraw from device-draw methods, and enable device-centric clipping.""""""
Previous failure was failure to detect that the clip wasn't wide-open when
optimizing for retain-vs-discard in copy-on-write. gm:copy_on_write_retain
detected this. Now fixed by adding new method to SkBaseDevice.h

This reverts commit 27d07f0acb.

BUG=skia:6214

Change-Id: I532d16ec075a4525c2a550b1157bcec695dd8efd
Reviewed-on: https://skia-review.googlesource.com/9341
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-07 15:43:03 +00:00
Mike Reed
d94abc5330 add test for copy-on-write optimization
exercises a bug in the device-clip CL (hopefully to land soon)
BUG=skia:

Change-Id: I5a740280e1a3d6a4634338d04d9f1a1f9dc84dbb
Reviewed-on: https://skia-review.googlesource.com/9325
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-06 22:15:36 +00:00
Brian Salomon
9e50f7b11e Store clipped bounds on GrOp rather than in parallel in GrRenderTargetOpList.
When the op is recorded we update its bounds to incorporate both clipping and aa bloat.

Change-Id: Ia205e058ebeda5fcdb2cd5e9b8a30a4972672b14
Reviewed-on: https://skia-review.googlesource.com/9233
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-06 18:16:28 +00:00
Brian Osman
32342f032e Rebase and fix chromium
Combine texture provider and resource provider

Largely mechanical. Only three places that were calling createApprox
via texture provider (ie without flags), so that was simple.

BUG=skia:

Change-Id: I876367bcdc6a8db736deedab1028de1972015509
Reviewed-on: https://skia-review.googlesource.com/9176
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-04 13:49:47 +00:00
Robert Phillips
4447b64a88 Switch SkImageGenerator over to generating GrTextureProxies
It does not seem irrational for generateTexture to always receive a valid GrContext. lockAsBitmap can do as it pleases.

This is split out of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors)

Change-Id: I8aebc813a8a3a7d694b7369c2c9810e2164fe16e
Reviewed-on: https://skia-review.googlesource.com/9191
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-03 17:40:52 +00:00
Robert Phillips
2f49314227 Make GrSurface::MakeDeferred return sk_sp<GrTextureProxy>
This should make upcoming changes less tedious

Change-Id: I313ae9df724f109a64cf5708a974e8bfeb963025
Reviewed-on: https://skia-review.googlesource.com/9183
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-03 12:35:27 +00:00
Mike Reed
c61abeed89 add isolate (init-with-previous) savelayer flag
BUG=skia:4884

Change-Id: If7fabf5cc2c87b870f48dfb87e27a2524fec5ae5
Reviewed-on: https://skia-review.googlesource.com/9045
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-03-01 02:11:08 +00:00
Jim Van Verth
33632d8eda Reland: Allow DFPathRenderer to store bitmaps at low resolutions
BUG=chromium:682918

Change-Id: Ieadb41229227a20d41b8e932ba0770fe72479898
Reviewed-on: https://skia-review.googlesource.com/9068
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-02-28 16:27:08 +00:00
Cary Clark
0755bb1db7 Revert "Allow distance field path renderer to store bitmaps at low resolutions"
This reverts commit c0bc1bb869.

Reason for revert: broke build with SkTDynamicHash error

Original change's description:
> Allow distance field path renderer to store bitmaps at low resolutions
> 
> BUG=chromium:682918
> 
> Change-Id: I1a0608f7e6394ab05eebc4b78fb7087ca718f617
> Reviewed-on: https://skia-review.googlesource.com/8971
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> 

TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:682918

Change-Id: I4a3c370a248915fe7c7e77dd0346d6ab6f0d10c6
Reviewed-on: https://skia-review.googlesource.com/9063
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-02-28 14:00:06 +00:00
Jim Van Verth
c0bc1bb869 Allow distance field path renderer to store bitmaps at low resolutions
BUG=chromium:682918

Change-Id: I1a0608f7e6394ab05eebc4b78fb7087ca718f617
Reviewed-on: https://skia-review.googlesource.com/8971
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-02-28 13:35:16 +00:00
Mike Reed
a07741a75a begin to hide details of SkPathEffect
BUG=skia:

Change-Id: I155d2370ae894e6000b6a768d02cf06bf5b3de6e
Reviewed-on: https://skia-review.googlesource.com/8977
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-02-26 18:36:11 +00:00
Ben Wagner
fc497343cb Add SkTypeface::getVariationDesignPosition.
Allow users to query a typeface's position in variation design space.

Change-Id: Id7cae439e795b8c9586394f11359fb7fe55e1c0b
Reviewed-on: https://skia-review.googlesource.com/8861
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-02-24 16:59:05 +00:00
Ben Wagner
97043299cb Revert "Add SkTypeface::getVariationDesignPosition."
This reverts commit 0f3d0c37db.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Add SkTypeface::getVariationDesignPosition.
> 
> Allow users to query a typeface's position in variation design space.
> 
> Change-Id: I173ee9eefdddee6b2613435ebcc6b08c25b382ed
> Reviewed-on: https://skia-review.googlesource.com/8684
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> 

TBR=bungeman@google.com,reed@google.com,reviews@skia.org,drott@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I484fe52c1f89e7b6d0024dcabf7c59d0e8b5b5e7
Reviewed-on: https://skia-review.googlesource.com/8929
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-02-23 20:48:53 +00:00
bungeman
0f3d0c37db Add SkTypeface::getVariationDesignPosition.
Allow users to query a typeface's position in variation design space.

Change-Id: I173ee9eefdddee6b2613435ebcc6b08c25b382ed
Reviewed-on: https://skia-review.googlesource.com/8684
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-02-23 18:41:57 +00:00
Brian Salomon
804e091df9 Make shadow_utils GM use its own SkResourceCache
This should stabilize the replay testing on the bots.

Change-Id: I89e3e308000743da6e1a765751103cffabc7e4ba
Reviewed-on: https://skia-review.googlesource.com/8902
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-02-23 16:22:56 +00:00
Yuqian Li
d196cbe9c2 Do not throw away the savelayer if kDontClipToLayer_PrivateSaveLayerFlag is set
This affects the Android CTS test
android.uirendering.cts.testclasses.LayerTests#testSaveLayerUnclippedWithAlpha

BUG=skia:

Change-Id: Idae150e7e4f7ed9a1a225c382ba0b40d3f840937
Reviewed-on: https://skia-review.googlesource.com/8892
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-02-23 16:17:08 +00:00
Mike Reed
bcfb8f639e Revert "Revert "Revert[2] "hide deprecated underline and strikethru"""
This reverts commit cfd3d9ff8f.

Reason for revert: derek is fixing caller

Original change's description:
> Revert "Revert[2] "hide deprecated underline and strikethru""
> 
> This reverts commit aab68c56ef.
> 
> Reason for revert: android still broken RecordingCanvasTests.cpp
> 
> Original change's description:
> > Revert[2] "hide deprecated underline and strikethru"
> > 
> > android now updated.
> > 
> > This reverts commit e005edd3a5.
> > 
> > BUG=skia:6250
> > 
> > Change-Id: If08d344cdd863fde1d9955dc3fab671a83be0f73
> > Reviewed-on: https://skia-review.googlesource.com/8815
> > Commit-Queue: Mike Reed <reed@google.com>
> > Reviewed-by: Mike Reed <reed@google.com>
> > 
> 
> TBR=reed@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:6250
> 
> Change-Id: I954575a0e4b9aca8414e10901a7be03a2d7e6396
> Reviewed-on: https://skia-review.googlesource.com/8900
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> 

TBR=reviews@skia.org,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6250

Change-Id: Ie518b64219a0262cd343644754940774bf42faec
Reviewed-on: https://skia-review.googlesource.com/8901
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-02-23 14:19:40 +00:00
Mike Reed
cfd3d9ff8f Revert "Revert[2] "hide deprecated underline and strikethru""
This reverts commit aab68c56ef.

Reason for revert: android still broken RecordingCanvasTests.cpp

Original change's description:
> Revert[2] "hide deprecated underline and strikethru"
> 
> android now updated.
> 
> This reverts commit e005edd3a5.
> 
> BUG=skia:6250
> 
> Change-Id: If08d344cdd863fde1d9955dc3fab671a83be0f73
> Reviewed-on: https://skia-review.googlesource.com/8815
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> 

TBR=reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6250

Change-Id: I954575a0e4b9aca8414e10901a7be03a2d7e6396
Reviewed-on: https://skia-review.googlesource.com/8900
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-02-23 14:06:19 +00:00
Mike Reed
aab68c56ef Revert[2] "hide deprecated underline and strikethru"
android now updated.

This reverts commit e005edd3a5.

BUG=skia:6250

Change-Id: If08d344cdd863fde1d9955dc3fab671a83be0f73
Reviewed-on: https://skia-review.googlesource.com/8815
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-02-22 21:41:26 +00:00
csmartdalton
008b9d80ab Add the ability to enable/disable GPU path renderers
Adds a bitfield to GrContextOptions that masks out path renderers.
Adds commandline flags support to set this bitfield in tools apps.
Removes GrGLInterfaceRemoveNVPR since we can now accomplish the same
thing in the context options.

BUG=skia:

Change-Id: Icf2a4df36374b3ba2f69ebf0db56e8aedd6cf65f
Reviewed-on: https://skia-review.googlesource.com/8786
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-02-22 20:29:56 +00:00
Mike Reed
3661bc9976 hide trivial helpers on canvas
BUG=skia:

Change-Id: I42d4ca92897bde5bd8e0575a0104b12b83134cef
Reviewed-on: https://skia-review.googlesource.com/8852
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-02-22 19:41:04 +00:00