Commit Graph

8227 Commits

Author SHA1 Message Date
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
Greg Daniel
323fbcf6d1 Move GrBackendRenderTarget over to new system of getting backed infos
Bug: skia:
Change-Id: I3927390894715e8424b3d0240dad3ee6cd03dc38
Reviewed-on: https://skia-review.googlesource.com/120181
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-04-11 11:14:58 +00:00
Greg Daniel
ff7fa50f0c Add ctor to GrVkImageInfo.
Adds an additional ctor so clients who used brace initialization on the
struct don't break.

Bug: skia:
Change-Id: I78ebdbe8242147e48859f2234265365141fe81b1
Reviewed-on: https://skia-review.googlesource.com/120185
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-04-10 17:41:32 +00:00
Greg Daniel
52e16d9848 Update getBackendInfo calls on GrBackendTexture to support VkImageLayout better.
The big api level change here is that the getBackendInfo calls now return by value
instead of a pointer. These changes are being made in support of Vulkan so that
the client can update the VkImageLayout on the GrBackendTexture and have that
update get reflected in our internal tracking of the image. This is done by storing
a ref counted GrVkImageLayout object on the GrBackendTexture and the GrVkImage.

Bug: skia:
Change-Id: I8c6158fd3a66eb61fef97ebf09ea5364bca3f1ae
Reviewed-on: https://skia-review.googlesource.com/119101
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-04-10 14:20:22 +00:00
Cary Clark
5c71518847 fix path to rect when missing close verb
R=brianosman@google.com,robertphillips@google.com
TBR=reed@google.com
Bug: 824145,skia:7792
Change-Id: I24f121cfa7d437c95b94bd917d3c4888a10c519e
Reviewed-on: https://skia-review.googlesource.com/119569
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-04-10 11:53:53 +00:00
Brian Salomon
a7b8e74eb6 Reland "Remove deprectated GrContext::MakeGL overloads that take raw ptr"
This reverts commit 87f852d1a3.

Reason for revert: Google3 updated

Original change's description:
> Revert "Remove deprectated GrContext::MakeGL overloads that take raw ptr"
> 
> This reverts commit efa60a1d13.
> 
> Reason for revert: Surprise! Google3 still uses these.
> 
> Original change's description:
> > Remove deprectated GrContext::MakeGL overloads that take raw ptr
> > 
> > Change-Id: Iae12bf61fa1e2f5d4b13b98198cddb7482656fdf
> > Reviewed-on: https://skia-review.googlesource.com/118660
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com
> 
> Change-Id: Ica09d80e1563924a286a4a6aa8a1f93cb5ca9c5d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/119001
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

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

Change-Id: I87c12253f759a97cb4da3ff35dc1ec846513caef
Reviewed-on: https://skia-review.googlesource.com/119921
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-04-09 17:14:46 +00:00
Brian Osman
0cfd547b46 Remove SK_SUPPORT_LEGACY_BLURMASKFILTER
Change-Id: I1d99d9bb83d8a612d1c1fd298c1f7ed706a2277b
Reviewed-on: https://skia-review.googlesource.com/118990
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-04-06 15:02:03 +00:00
Brian Salomon
c1b9c1005f Add versions of MakeGL() that don't require include GrGLInterface.h in order to use the GrGLMakeNativeInterface
Change-Id: I77bd3c683c284aecc50a3552bbf1fb901f1bcc44
Reviewed-on: https://skia-review.googlesource.com/119002
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-04-06 14:44:53 +00:00
Greg Daniel
9ca3065ca5 Don't use GrPixelConfig value as proxy for valid on GrBackendSurface.
Bug: skia:
Change-Id: I275b74b915240c9918bb2efa6a9708341f3bb189
Reviewed-on: https://skia-review.googlesource.com/119004
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-04-06 14:42:23 +00:00
Cary Clark
99885411ae remove SK_IGNORE_TO_STRING
SK_IGNORE_TO_STRING is not defined anywhere.
The same effect can be had by using a modern
linker.

Removing it simplifies bookmaker and makes
our includes easier to understand.

R=robertphillips@google.com
TBR=reed@google.com

Bug: skia:6898
Change-Id: Ib716f5ef1b42a7fbda0df43ece212d1b7c40289f
Reviewed-on: https://skia-review.googlesource.com/118963
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-04-05 23:52:23 +00:00
Robert Phillips
87f852d1a3 Revert "Remove deprectated GrContext::MakeGL overloads that take raw ptr"
This reverts commit efa60a1d13.

Reason for revert: Surprise! Google3 still uses these.

Original change's description:
> Remove deprectated GrContext::MakeGL overloads that take raw ptr
> 
> Change-Id: Iae12bf61fa1e2f5d4b13b98198cddb7482656fdf
> Reviewed-on: https://skia-review.googlesource.com/118660
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ica09d80e1563924a286a4a6aa8a1f93cb5ca9c5d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/119001
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-04-05 19:37:49 +00:00
Brian Salomon
efa60a1d13 Remove deprectated GrContext::MakeGL overloads that take raw ptr
Change-Id: Iae12bf61fa1e2f5d4b13b98198cddb7482656fdf
Reviewed-on: https://skia-review.googlesource.com/118660
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-04-05 17:23:22 +00:00
Brian Salomon
f932a6328a Add maxTextureSize()/maxRenderTargetSize() to GrContext
This provides an alternative way to access these values which will allow removal GrContext::caps() from public API

Change-Id: I53d3c00563da8847e1fc14aea9750dc9fd90d1e5
Reviewed-on: https://skia-review.googlesource.com/118962
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-04-05 17:21:32 +00:00
Robert Phillips
8caf85f9f4 Add GrBackendTexture/RenderTarget accessors to SkSurface
Change-Id: I63477fd4b8d48dc50af72736f0f8df566cd96d4a
Reviewed-on: https://skia-review.googlesource.com/85220
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Cary Clark <caryclark@skia.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-04-05 14:21:07 +00:00