Commit Graph

8240 Commits

Author SHA1 Message Date
Yuqian Li
8ba34f82dd Change SkMatrix44::fTypeMask to atomic
Bug: skia:7886
Change-Id: If616b8bf3b50366356b4324760ad82cbc5fd937d
Reviewed-on: https://skia-review.googlesource.com/124460
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2018-05-03 15:56:12 +00:00
Greg Daniel
b73a9f8b96 Add internal grsurface flag to track if using gl rectangle or external texture.
Bug: skia:
Change-Id: I84963833bbc3ae957c919a19f6e78fce2c9de7ef
Reviewed-on: https://skia-review.googlesource.com/125294
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-05-02 21:34:58 +00:00
Herb Derby
90864a21c4 Simplify textToGlyphs
Change-Id: I9f2ae8e669ab3c22b66f9b10bd2650b5f5ab0bd4
Reviewed-on: https://skia-review.googlesource.com/125345
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Herb Derby <herb@google.com>
2018-05-02 20:50:28 +00:00
Herb Derby
fcac00f2f1 Reland "Remove devKerning"
This is a reland of c86c5c0144

Original change's description:
> Remove devKerning
> 
> Dev kerning is not supported by any scalers. This is
> mostly removed. The remaining fields fRsbDelta and
> fLsbDelta are kept to keep Android compiling.
> 
> Change-Id: If1a9ee9bb599d4e1bdf4b3751ac0c65246350809
> Reviewed-on: https://skia-review.googlesource.com/124921
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

Change-Id: Ibf5fac5f1442c7e62392d5146ad460da27b10d5c
Reviewed-on: https://skia-review.googlesource.com/125300
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-05-02 15:15:08 +00:00
Herb Derby
efe39bcfb8 Take sk_sp<SkDevice> instead of SkDevice*
Change-Id: I0b296bf5b80adc19758a3dc99160be9d2ed05680
Reviewed-on: https://skia-review.googlesource.com/125160
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Auto-Submit: Herb Derby <herb@google.com>
2018-05-02 14:46:17 +00:00
Mike Klein
c76e26a6bb Revert "Remove devKerning"
This reverts commit c86c5c0144.

Reason for revert: 4 of 5

Original change's description:
> Remove devKerning
> 
> Dev kerning is not supported by any scalers. This is
> mostly removed. The remaining fields fRsbDelta and
> fLsbDelta are kept to keep Android compiling.
> 
> Change-Id: If1a9ee9bb599d4e1bdf4b3751ac0c65246350809
> Reviewed-on: https://skia-review.googlesource.com/124921
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

TBR=bungeman@google.com,herb@google.com,reed@google.com

Change-Id: If865f702868192a1b72cd811baa996dd1282bbce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/125263
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-05-02 13:54:54 +00:00
Herb Derby
c86c5c0144 Remove devKerning
Dev kerning is not supported by any scalers. This is
mostly removed. The remaining fields fRsbDelta and
fLsbDelta are kept to keep Android compiling.

Change-Id: If1a9ee9bb599d4e1bdf4b3751ac0c65246350809
Reviewed-on: https://skia-review.googlesource.com/124921
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-05-01 21:12:15 +00:00
Cary Clark
3155d9c912 Revert "remove obsolete color defines"
This reverts commit 8afbecbcc0.

Reason for revert: broke pdfium

Original change's description:
> remove obsolete color defines
> 
> The uses in Skia, Chrome, and Google3 have already
> been removed. If I missed one or more, please let
> me know (and feel free to revert).
> 
> TBR=reed@google.com,brianosman@google.com
> Bug: skia:6898
> Change-Id: I9d15b1a06f5abfc3a0fc6f3f1b4d348916c3d362
> Reviewed-on: https://skia-review.googlesource.com/124840
> Reviewed-by: Cary Clark <caryclark@skia.org>
> Commit-Queue: Cary Clark <caryclark@skia.org>
> Auto-Submit: Cary Clark <caryclark@skia.org>

TBR=brianosman@google.com,reed@google.com,caryclark@skia.org

Change-Id: Ic7c1003261cda5dee80e222da123c6717b4ea707
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6898
Reviewed-on: https://skia-review.googlesource.com/124880
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-05-01 15:00:55 +00:00
Florin Malita
41dff6ef68 [skottie] Add support for round-corners geometry effects
TBR=
Change-Id: I5505561df28d5953526662d60fe2300cb112bc37
Reviewed-on: https://skia-review.googlesource.com/124769
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-05-01 14:54:14 +00:00
Cary Clark
8afbecbcc0 remove obsolete color defines
The uses in Skia, Chrome, and Google3 have already
been removed. If I missed one or more, please let
me know (and feel free to revert).

TBR=reed@google.com,brianosman@google.com
Bug: skia:6898
Change-Id: I9d15b1a06f5abfc3a0fc6f3f1b4d348916c3d362
Reviewed-on: https://skia-review.googlesource.com/124840
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
Auto-Submit: Cary Clark <caryclark@skia.org>
2018-05-01 14:29:44 +00:00
Brian Salomon
fb68b3bce2 Remove GrPrimitiveType::kTriangleFan
Change-Id: Ia121198ebcdc34e32a3ff99b0821047256df282d
Reviewed-on: https://skia-review.googlesource.com/124503
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-04-30 18:36:43 +00:00
Brian Salomon
cccafe8cfd Rewrite SkVertices specified with triangle fans as indexed triangles
Change-Id: Ifaacc426bc657b324f6a885a8ef70b347b048226
Reviewed-on: https://skia-review.googlesource.com/124349
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2018-04-28 20:32:15 +00:00
Greg Daniel
a070ed7fcc Add InternalSurfaceFlag so we know if RenderTargetProxys and RenderTargets use GL FBO 0.
Bug: skia:7748
Change-Id: I2fda3cde12ccdef19fe06ff287a8024b58d28ef0
Reviewed-on: https://skia-review.googlesource.com/124048
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-04-26 21:44:43 +00:00
Cary Clark
d98f78cd01 alternative no anonymous enums
Anonymous enums play havoc with documentation;
there's no name to refer to. It may be that all
enums may either be named or replaced with constexpr
without breaking anything. Try replacing all
anonymous enums in include/core to see what happens.

This names SkCanvas::SaveLayerFlagsSet but leaves
SkCanvas::SaveLayerFlags as a uint32_t, to reduce
risk as compared to review.skia.org/123584.

There's also some chance that external linkage will
break if some client refers to anonymous enum in a way
that could require its address: see
https://stackoverflow.com/questions/22867654/enum-vs-constexpr-for-actual-static-constants-inside-classes
(This CL does not require definitions + declarations)

Brought bookmaker docs in line with this change.
This also tripped over missing code in bookmaker
handling constexpr so added that as well.

R=reed@google.com,bsalomon@google.com

Docs-Preview: https://skia.org/?cl=123920
Docs-Preview: https://skia.org/?cl=123584
Bug: skia:6898
Change-Id: I14a342edcfd59e139ef9e4501f562417c4c60391
Reviewed-on: https://skia-review.googlesource.com/123920
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-04-26 17:11:53 +00:00
Chris Dalton
218c29453f Remove the MSAA path renderer
Bug: skia:
Change-Id: Ib18bede613c8d27fd6326f655dc2d638e35870ff
Reviewed-on: https://skia-review.googlesource.com/123726
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-04-25 19:59:59 +00:00
Greg Daniel
25af671a3d Add GrCap check for whether we can do a copy or not, and implement in Vk backend
Today, we only know if we fail a copy during the flush so we have no
way to cleanly handle a failed copy. This will allow us to know if we'll
fail a copy during recording and allow us to do some appropriate fallback
and/or dropping of the draw.

Bug: skia:
Change-Id: I38f209dbd4ebb4e762210b4609147d4b0a1b01b1
Reviewed-on: https://skia-review.googlesource.com/123560
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-04-25 19:38:57 +00:00
Mike Reed
910ca0fd01 Experiment to track coverage in a layer
Bug: skia:
Change-Id: I5ed334f63e64991944394dc8103092a2c6280546
Reviewed-on: https://skia-review.googlesource.com/122000
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-04-25 17:34:27 +00:00
Hal Canary
47728258b0 include/private/SkTemplates: SkInPlaceNewCheck uses ...
Change-Id: Ia9af6daec20bdd4bfa7f34c8bff7b400f5775dd9
Reviewed-on: https://skia-review.googlesource.com/123503
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-04-24 19:29:16 +00:00
Hal Canary
6736236faf include/private/SkTemplates: Cleanup bare pointers.
include/private:
-  SkAutoTArray, SkAutoTMalloc no longer use bare pointers to owned memory,
-   SkTHash and SkAutoTArray are now std::move()able.
-   SkAutoTArray::swap no longer neccesary.
-   SkAutoTMalloc::operator=() defined.

src/pdf:
-   SkPDFCanon and SkPDFObjectSerializer are now std::move()able.
-   `template <class T> static void renew(T* t) { t->~T(); new (t) T; }` is gone.

Change-Id: I2f36a0780c47d1427a85da240121c898387fb4cf
Reviewed-on: https://skia-review.googlesource.com/123401
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-04-24 19:13:56 +00:00
Greg Daniel
849dce1d7b Update flag checks when validating surface being assigned to proxy.
Bug: skia:7748
Change-Id: Id87c0b1be2efbdefd96740e9591fd102e09b4d95
Reviewed-on: https://skia-review.googlesource.com/123423
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-04-24 18:59:16 +00:00
Leon Scroggins III
57e1f02011 (Mostly) respect FilterQuality in draw[stretchy]
Bug: b/77917978

For
  drawImageLattice
  drawBitmapLattice
  drawImageNine
  drawBitmapNine
, respect the SkFilterQuality on the SkPaint. Previously the GPU used
the lowest quality to avoid a bleeding effect, leading to ugly nine-
patches on Android.

For all backends, cap the filter quality at kLow_SkFilterQuality.
Update SkCanvas' documentation to specify this.

Change-Id: Id28c7753834975f039170f14bc51be4f2bd44d41
Reviewed-on: https://skia-review.googlesource.com/121891
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Auto-Submit: Leon Scroggins <scroggo@google.com>
2018-04-23 14:27:30 +00:00
Yong-Hwan Baek
701a3ca157 Fixed SkVertices crashing on Windows DLL builds
SkVertices::Builder uses custom new operator but not exposed to dll.
While delete operator in SkVertices.h could be inlined, it causes crash on Windows DLL builds. This patch fixes this issue.
Change-Id: I8b635ad3aa4a3f496a392ce7840417947999e4b0
Reviewed-on: https://skia-review.googlesource.com/122480
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-04-22 14:42:01 +00:00
Brian Osman
2fda63abcd Fix argument names and documentation for SkMatrix44::set3x3()
Column-major is an implementation choice, not an interface. There is
exactly one acceptable subscript notation for indexing matrix elements,
and it's row first, then column. Having these named backwards was
unnecessarily confusing.

Note that this doesn't alter behavior in any way, it just brings this
function in line with expectations from any reasonable mathematician.

Change-Id: Ie4ceb40281ef507889d25403afbf24116514c45a
Reviewed-on: https://skia-review.googlesource.com/122790
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-04-20 18:08:18 +00:00
Robert Phillips
2748391716 Add ability to dump opList info at flush-time
When debugging DDL it is useful to just see which ops are being drawn instead of the entire reordering history.

Change-Id: I89708fecbd53c097b00e65b0da426bfb8046b0ee
Reviewed-on: https://skia-review.googlesource.com/122780
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-04-20 17:47:55 +00:00
Robert Phillips
ab4f5bde7f rm SkRRectsGaussianEdgeMaskFilter
Neat but unused.

Change-Id: I1b2d160df274b05cfb5582a5385085cc2db89f7d
Reviewed-on: https://skia-review.googlesource.com/121960
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-04-19 17:21:44 +00:00
Mike Klein
12ee97c991 crash rather than overflow in SkTDArray
This adds explicit overflow checks to the two likeliest
places where non-buggy code could overflow SkTDArray.

We have an #ifdef'd out PathMeasure_explosion GM that
overflows before this CL and aborts with it.

Bug: skia:7674

Change-Id: Ia0c430f4a8bb9bad687d13c875f604fd7da45aab
Reviewed-on: https://skia-review.googlesource.com/122342
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-04-19 16:45:45 +00:00
Mike Klein
23e4544e94 disallow negative setReserve() calls
We already assert that setCount()'s argument is non-negative.
This does the same for setReserve().

There was one call site I could find that was actually sometimes
passing negative values to setReserve(), guarded here.

Already reviewed: https://skia-review.googlesource.com/c/skia/+/115982

Change-Id: Ia52a286732bf4056e9baf09555d27bab9abf2554
Reviewed-on: https://skia-review.googlesource.com/122305
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-04-19 14:08:14 +00:00
Mike Klein
bd000a11c7 rm SkTDArray::select()
It's only used in one call site, which is clearer without it.

Already reviewed: https://skia-review.googlesource.com/c/skia/+/115982

Change-Id: I3d0f8c1f0756e01e29cdb9f9328b0f557d3650d3
Reviewed-on: https://skia-review.googlesource.com/122302
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-04-19 14:01:34 +00:00
Chris Dalton
91ab155884 Always call endFlush on opLists that might survive a flush
We were missing a few that got unreffed due to failed proxy
instantiation.

Bug: skia:7655
Bug: skia:7111
Change-Id: I95847a16890f2993a1433d4d9fdaa8a4a6c2f0b6
Reviewed-on: https://skia-review.googlesource.com/122121
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-04-18 20:00:53 +00:00
Brian Osman
061020eab4 With ES3, enable both ES2 and ES3 external image extensions
Bug: skia:7713
Change-Id: If06c0368e91c33bbac9e7715227d619c4834684f
Reviewed-on: https://skia-review.googlesource.com/121884
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-04-18 19:13:13 +00:00
Ben Wagner
a580fb3f9e Add paint flags to viewer GUI.
Overriding bits of the paint was added with keyboard bindings but
without being reflected in the GUI. This adds these flags to the GUI.

Change-Id: I633801fb776248952afe7cbe8857676ef8b57135
Reviewed-on: https://skia-review.googlesource.com/121796
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-04-17 16:10:14 +00:00
Brian Osman
77d085ef9f Add SkColorSpace::Make, taking an skcms_ICCProfile
Bug: skia:7419
Change-Id: I912d4ae842d9cab09395fac3136e2e900611c8e5
Reviewed-on: https://skia-review.googlesource.com/121358
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-04-17 15:18:14 +00:00
Hal Canary
84c0792ea5 SkColorSetARGB in constants
Change-Id: I5a6edb031c5d561d9def6d8e57a393b4f9c2e6fc
Reviewed-on: https://skia-review.googlesource.com/121588
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-04-17 12:25:13 +00:00
Ben Wagner
d234afdc2e Remove SkPaint::kGenA8FromLCD_Flag.
The original intent of this flag is now handled by SkPixelGeomety on
SkSurfaceProps on SkSurface.

BUG=skia:7515

Change-Id: I54bb1be072b5b5b2164a59196bfeacac254823c7
Reviewed-on: https://skia-review.googlesource.com/121346
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2018-04-16 21:11:10 +00:00
Greg Daniel
e320486489 Don't allow ganesh to allocate mip maps for wrapped textures.
We will not allocate new mips on a wrapped texture but we will use mips
if the wrapped texture already has one. If we need mips for a draw this
will trigger a copy to occur.

Also some cleanup up of our InternalSurfaceFlags in general.

Bug: skia:7806
Change-Id: I7aa666478cc91bba6e0644b323825fcc9b49793a
Reviewed-on: https://skia-review.googlesource.com/121348
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-04-16 17:05:20 +00:00
Greg Daniel
7444c3c518 Revert "Delete getRenderTargetHandle call on SkSurface."
This reverts commit c828109ebd.

Reason for revert: Need to fix flutter

Original change's description:
> Delete getRenderTargetHandle call on SkSurface.
> 
> All clients and internal code should be switched (once changes land soon)
> to the new getBackendRenderTarget call instead.
> 
> Bug: skia:
> Change-Id: I6f490b6d26a72f37f97216be04e541483206510d
> Reviewed-on: https://skia-review.googlesource.com/121103
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: skia:
Change-Id: I571298f839757fcdedcd8117519e740ac7ef1344
Reviewed-on: https://skia-review.googlesource.com/121480
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-04-14 18:08:12 +00:00
Mike Reed
408ee9fecd remove unused virtual onNotifyPixelsChanged
Bug: skia:
Change-Id: I993701a1059d7d309991b06147bd0cc4a1a4fe93
Reviewed-on: https://skia-review.googlesource.com/121350
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-04-13 21:23:07 +00:00
Brian Osman
584b501816 Support downscaling to max texture size when making cross-context images
This is one solution to https://github.com/flutter/flutter/issues/16454

Change-Id: Iacd59f07e1bf87b6caccb64df16ab8827dfc78b1
Reviewed-on: https://skia-review.googlesource.com/121342
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-04-13 20:41:12 +00:00
Heather Miller
d1999cacd8 Update Skia milestone to 68
TBR=reed

Bug: skia:
Change-Id: I17ff9424c674efbc782bf1b40477467c678cddd9
Reviewed-on: https://skia-review.googlesource.com/121321
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
2018-04-13 14:01:02 +00:00
Greg Daniel
c828109ebd Delete getRenderTargetHandle call on SkSurface.
All clients and internal code should be switched (once changes land soon)
to the new getBackendRenderTarget call instead.

Bug: skia:
Change-Id: I6f490b6d26a72f37f97216be04e541483206510d
Reviewed-on: https://skia-review.googlesource.com/121103
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-04-12 19:41:10 +00:00
Yuqian Li
9438790b66 Reland "Add private fIsBadForDAA bit to SkPath"
This reverts commit ed5e069dbb.

Reason for revert: add the guard flag

Original change's description:
> Revert "Add private fIsBadForDAA bit to SkPath"
> 
> This reverts commit 54aefc7410.
> 
> Reason for revert: Forget the guard flag. Pixel tests would fail.
> 
> Original change's description:
> > Add private fIsBadForDAA bit to SkPath
> > 
> > Bug: chromium:821353
> > Change-Id: Ic6585e76df692bb1853d0990d75f0e8d1dee22f4
> > Reviewed-on: https://skia-review.googlesource.com/120201
> > Commit-Queue: Yuqian Li <liyuqian@google.com>
> > Reviewed-by: Mike Reed <reed@google.com>
> 
> TBR=caryclark@google.com,liyuqian@google.com,reed@google.com
> 
> Change-Id: I2fe7cfcc3a80a51415f72d656da95a894a3240a4
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:821353
> Reviewed-on: https://skia-review.googlesource.com/120505
> Reviewed-by: Yuqian Li <liyuqian@google.com>
> Commit-Queue: Yuqian Li <liyuqian@google.com>

TBR=caryclark@google.com,liyuqian@google.com,reed@google.com

Change-Id: Iebf7caf9ca74f305dec25b1b6512e93cb41cc8ec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:821353
Reviewed-on: https://skia-review.googlesource.com/120620
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
2018-04-12 16:24:40 +00:00
Robert Phillips
ba375a8884 Add SK_SUPPORT_LEGACY_BACKEND_OBJECTS
This relies on the Chrome CL: https://chromium-review.googlesource.com/c/chromium/src/+/999796 (Add SK_SUPPORT_LEGACY_BACKEND_OBJECTS to SkUserConfig.h) landing first.

Change-Id: Ie0a2b7b84cc02e46957765a0a7d6444a5320769d
Reviewed-on: https://skia-review.googlesource.com/119140
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-04-12 14:56:10 +00:00
Florin Malita
c6c5eade82 Reland "Fix handling of MaskFilter matrices"
This reverts commit c64ee20e13.

Reason for revert: initial failures should be fixed in https://skia.googlesource.com/skia.git/+/8eaf64ae12696d4189d3cea9f023658494cf82b8

Original change's description:
> Revert "Fix handling of MaskFilter matrices"
> 
> This reverts commit 2097fd03ff.
> 
> Reason for revert: This is breaking a lot of Windows bots (esp. on the shadermaskfilter_localmatrix)
> 
> Original change's description:
> > Fix handling of MaskFilter matrices
> > 
> > 1) extend GrFPArgs to track pre/post local matrices, add helpers for
> >    creating pre/post wrapper args
> > 
> > 2) add a SkShaderBase helper (totalLocalMatrix) to centralize the LM
> >    sandwich logic.
> > 
> > 3) update call sites to use the above
> > 
> > 4) rename SkMatrixFilter::makeWithLocalMatrix -> makeWithMatrix, to
> >    disambiguate vs. SkShader::makeWithLocalMatrix.
> > 
> > BUG=skia:7744
> > 
> > Change-Id: Ib2b7b007e6924979b00649dde7c94ef4b34771f1
> > Reviewed-on: https://skia-review.googlesource.com/119330
> > Commit-Queue: Florin Malita <fmalita@chromium.org>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> 
> TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com
> 
> Change-Id: I918dbb95bf00b3122e6699b84566ec82dbb5fc5c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:7744
> Reviewed-on: https://skia-review.googlesource.com/120340
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com

Change-Id: If194862a928d1abe22ed8fa968436c725d19a8fc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7744
Reviewed-on: https://skia-review.googlesource.com/120480
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-04-11 20:13:22 +00:00
Mike Reed
1f275851ec remove unused/dumb methods from SkRect
Bug: skia:
Change-Id: I407dc94256a347c7a9343b75a5af43c4294891d3
Reviewed-on: https://skia-review.googlesource.com/119360
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
2018-04-11 19:40:57 +00:00
Yuqian Li
ed5e069dbb Revert "Add private fIsBadForDAA bit to SkPath"
This reverts commit 54aefc7410.

Reason for revert: Forget the guard flag. Pixel tests would fail.

Original change's description:
> Add private fIsBadForDAA bit to SkPath
> 
> Bug: chromium:821353
> Change-Id: Ic6585e76df692bb1853d0990d75f0e8d1dee22f4
> Reviewed-on: https://skia-review.googlesource.com/120201
> Commit-Queue: Yuqian Li <liyuqian@google.com>
> Reviewed-by: Mike Reed <reed@google.com>

TBR=caryclark@google.com,liyuqian@google.com,reed@google.com

Change-Id: I2fe7cfcc3a80a51415f72d656da95a894a3240a4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:821353
Reviewed-on: https://skia-review.googlesource.com/120505
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2018-04-11 18:37:29 +00:00
Yuqian Li
54aefc7410 Add private fIsBadForDAA bit to SkPath
Bug: chromium:821353
Change-Id: Ic6585e76df692bb1853d0990d75f0e8d1dee22f4
Reviewed-on: https://skia-review.googlesource.com/120201
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-04-11 18:32:27 +00:00
Florin Malita
8eaf64ae12 Fix SkTCopyOnFirstWrite copy semantics
The implicit SkTCopyOnFirstWrite copy-ctor and assignment operator are
incorrect: fObj must point to the local copy, not to the source copy
(when a copy has been made).

Add corrected explicit copy (and move) ctor + assignment operator.

Also add a get() helper to facilitate rawptr access.

Change-Id: Ie3983e12c04eae4f32c40e3e267618cf02008c20
Reviewed-on: https://skia-review.googlesource.com/120442
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-04-11 17:25:07 +00:00
Greg Daniel
044b67d6c7 Remove guard around getBackendTexture/RenderTarget calls
Bug: skia:
Change-Id: Ia9ad987d4af183985724f32b022553af0fcb2b78
Reviewed-on: https://skia-review.googlesource.com/120124
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-04-11 13:38:26 +00:00
Robert Phillips
c64ee20e13 Revert "Fix handling of MaskFilter matrices"
This reverts commit 2097fd03ff.

Reason for revert: This is breaking a lot of Windows bots (esp. on the shadermaskfilter_localmatrix)

Original change's description:
> Fix handling of MaskFilter matrices
> 
> 1) extend GrFPArgs to track pre/post local matrices, add helpers for
>    creating pre/post wrapper args
> 
> 2) add a SkShaderBase helper (totalLocalMatrix) to centralize the LM
>    sandwich logic.
> 
> 3) update call sites to use the above
> 
> 4) rename SkMatrixFilter::makeWithLocalMatrix -> makeWithMatrix, to
>    disambiguate vs. SkShader::makeWithLocalMatrix.
> 
> BUG=skia:7744
> 
> Change-Id: Ib2b7b007e6924979b00649dde7c94ef4b34771f1
> Reviewed-on: https://skia-review.googlesource.com/119330
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com

Change-Id: I918dbb95bf00b3122e6699b84566ec82dbb5fc5c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7744
Reviewed-on: https://skia-review.googlesource.com/120340
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-04-11 12:38:47 +00:00
Florin Malita
2097fd03ff Fix handling of MaskFilter matrices
1) extend GrFPArgs to track pre/post local matrices, add helpers for
   creating pre/post wrapper args

2) add a SkShaderBase helper (totalLocalMatrix) to centralize the LM
   sandwich logic.

3) update call sites to use the above

4) rename SkMatrixFilter::makeWithLocalMatrix -> makeWithMatrix, to
   disambiguate vs. SkShader::makeWithLocalMatrix.

BUG=skia:7744

Change-Id: Ib2b7b007e6924979b00649dde7c94ef4b34771f1
Reviewed-on: https://skia-review.googlesource.com/119330
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-04-11 11:25:06 +00:00