Commit Graph

201 Commits

Author SHA1 Message Date
Chris Dalton
9ca27849d8 Extract a GrCCPathParser class that is decoupled from atlas ops
Allows coverage counts ultimately to be drawn either to an atlas or
directly to the framebuffer.

Bug: skia:
Change-Id: I6cc07fce562c223381b89586d19ae98298bafe4d
Reviewed-on: https://skia-review.googlesource.com/96083
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-01-18 19:46:48 +00:00
Chris Dalton
383a2ef6ed CCPR: Rename GrCCPR* -> GrCC*
Also runs clang-format on the files that don't have special shader
builder styling.

Bug: skia:
Change-Id: I4a67569a7c8472acfb9200644c913844a92e3b2d
Reviewed-on: https://skia-review.googlesource.com/92083
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-01-08 22:51:11 +00:00
Robert Phillips
1afd4cdb08 Add GrProxyProvider
This pulls all the proxy tracking & creation functionality out of the GrResourceCache and GrResourceProvider and consolidates it in the GrProxyProvider.

Change-Id: I7256f7c544319a70c1bd93dd5a9ccbe5fa0a544f
Reviewed-on: https://skia-review.googlesource.com/91501
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-01-08 19:05:31 +00:00
Greg Daniel
8982dc1a4c Add GrResourceProviderPriv and expose GrGpu in it
Bug: skia:
Change-Id: Iad965ecf33c9dc75c4f068d547698d973f52eb94
Reviewed-on: https://skia-review.googlesource.com/91440
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-01-05 19:03:04 +00:00
Chris Dalton
90e8fb1d98 Reland "CCPR: Initial semi-optimized vertex shader Impl"
This is a reland of e3877ce5ce
Original change's description:
> CCPR: Initial semi-optimized vertex shader Impl
> 
> TBR=bsalomon@google.com
> 
> Bug: skia:
> Change-Id: I24173e146d8c95cec5f29e8cb4fa5e2c28f9a33c
> Reviewed-on: https://skia-review.googlesource.com/89120
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

Bug: skia:
Change-Id: I1d194853540e64df9c7b55ceb388a5d2f32bc258
Reviewed-on: https://skia-review.googlesource.com/90963
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-01-04 23:51:34 +00:00
Chris Dalton
d23c7c45dc Revert "CCPR: Initial semi-optimized vertex shader Impl"
This reverts commit e3877ce5ce.

Reason for revert: Intel crashing again

Original change's description:
> CCPR: Initial semi-optimized vertex shader Impl
> 
> TBR=bsalomon@google.com
> 
> Bug: skia:
> Change-Id: I24173e146d8c95cec5f29e8cb4fa5e2c28f9a33c
> Reviewed-on: https://skia-review.googlesource.com/89120
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=bsalomon@google.com,brianosman@google.com,csmartdalton@google.com

Change-Id: I2485db30397958722a07c5992c748ab69365ebb6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/89300
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-12-22 19:05:26 +00:00
Chris Dalton
e3877ce5ce CCPR: Initial semi-optimized vertex shader Impl
TBR=bsalomon@google.com

Bug: skia:
Change-Id: I24173e146d8c95cec5f29e8cb4fa5e2c28f9a33c
Reviewed-on: https://skia-review.googlesource.com/89120
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-12-22 18:42:05 +00:00
Ethan Nicholas
7461a4abe0 converted YUVEffect to SkSL
Bug: skia:
Change-Id: I1875e44417a0a583c4f35ee4d46856a34ba55245
Reviewed-on: https://skia-review.googlesource.com/88580
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-12-22 14:06:45 +00:00
Brian Osman
2871436b2a Revert "CCPR: Initial semi-optimized vertex shader Impl"
This reverts commit a8f6aef13d.

Reason for revert: Looks to failing on ANGLE bots

Original change's description:
> CCPR: Initial semi-optimized vertex shader Impl
> 
> Bug: skia:
> Change-Id: If22f47a3b945ce7336f8e609c2e0c911f09e1d18
> Reviewed-on: https://skia-review.googlesource.com/86820
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

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

Change-Id: Ic5a73434cba4246a72790db2c27d06e7a50f389a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/88220
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-12-20 22:15:48 +00:00
Chris Dalton
a8f6aef13d CCPR: Initial semi-optimized vertex shader Impl
Bug: skia:
Change-Id: If22f47a3b945ce7336f8e609c2e0c911f09e1d18
Reviewed-on: https://skia-review.googlesource.com/86820
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-12-20 20:59:46 +00:00
Ethan Nicholas
297d6efe85 converted GrRRectBlurEffect to SkSL
Bug: skia:
Change-Id: Ifd192db07e02d69d445277a361760ce4a452f603
Reviewed-on: https://skia-review.googlesource.com/87441
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-12-20 19:56:36 +00:00
Ethan Nicholas
2d5f9b3d58 converted GrMagnifierEffect to SkSL
Bug: skia:
Change-Id: I6dc14ac66d5b911117e71fa23fef49a897082781
Reviewed-on: https://skia-review.googlesource.com/71342
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-12-13 20:01:40 +00:00
Robert Phillips
e42edcc8ef Add stubbed out GrContext
This CL mainly just:
   stores the GrContextOptions in GrContextThreadSafeProxy (so they can be passed on to a stubbed out GrContext)
   adds a method to create a stubbed out GrContext that has a GrStubGpu
      - the stubbed out GrContext isn't quite ready for prime time yet

Change-Id: I31be6763640e406c5963e6f0714489ac358339e4
Reviewed-on: https://skia-review.googlesource.com/79601
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-12-13 18:24:30 +00:00
Brian Salomon
3d6801eeee Add GrGLMakeNativeInterface factory that returns sk_sp<const GrGLInterface>.
Removes the concept of a configurable "default" interface and makes the default
always be the "native" interface.

Also removes unused functions: GrGLInterfaceAddTestDebugMarker and
GrGLInterface::NewClone.

Keeps around legacy GrGLCreateNativeInterface() until clients can be weened.

Change-Id: I4a3bdafa8cf8c68ed13318393abd55686b045ccb
Reviewed-on: https://skia-review.googlesource.com/83000
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-12-11 17:54:38 +00:00
Brian Salomon
f06c358267 Remove instanced rendering
Change-Id: I4219b1d23a647b849ee41fe71b53e1c45edfc3f4
Reviewed-on: https://skia-review.googlesource.com/82241
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-12-08 13:41:10 +00:00
Chris Dalton
a32a3c32c3 Add analytic clip FPs that read from the CCPR atlas
Bug: skia:7190
Change-Id: Ie31d368f52910e6917efdeb1b024370b06fc11ee
Reviewed-on: https://skia-review.googlesource.com/77160
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-12-05 18:06:18 +00:00
Brian Salomon
cbcb0a12ad Revert "Revert "Add Atlas Text interface for rendering SDF glyphs.""
This reverts commit 9c2202ffc2.

Bug: skia:
Change-Id: I482ddf74f8e40d3d0908c840ba5c6ff981ccefbd
Reviewed-on: https://skia-review.googlesource.com/73345
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-19 18:55:18 +00:00
Greg Daniel
9c2202ffc2 Revert "Add Atlas Text interface for rendering SDF glyphs."
This reverts commit 39631f3df1.

Reason for revert: break google3 rool

Original change's description:
> Add Atlas Text interface for rendering SDF glyphs.
> 
> This new API is built upon SDF text atlas code from the GPU backend. Unlike using the GPU
> backend to draw text, this set of interfaces allows the client to render the SDF glyphs. The
> client issues text draws to potentially multiple targets and then the client flushes. The
> client then gets commands from Skia with data to put into a texture atlas and vertices to
> draw that reference the texture. The client is responsible for creating the texture, uploading
> the SDF data to the texture, and drawing the vertices provided by Skia.
> 
> Change-Id: Ie9447e19b85f0ce1c2b942e5216c787a74f335d3
> Reviewed-on: https://skia-review.googlesource.com/59360
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: I4aad0c99e645b476fd8ba25731f2a10e8802bb25
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/73420
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-18 13:32:08 +00:00
Brian Salomon
39631f3df1 Add Atlas Text interface for rendering SDF glyphs.
This new API is built upon SDF text atlas code from the GPU backend. Unlike using the GPU
backend to draw text, this set of interfaces allows the client to render the SDF glyphs. The
client issues text draws to potentially multiple targets and then the client flushes. The
client then gets commands from Skia with data to put into a texture atlas and vertices to
draw that reference the texture. The client is responsible for creating the texture, uploading
the SDF data to the texture, and drawing the vertices provided by Skia.

Change-Id: Ie9447e19b85f0ce1c2b942e5216c787a74f335d3
Reviewed-on: https://skia-review.googlesource.com/59360
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-11-17 20:35:06 +00:00
Ethan Nicholas
be0a042dcf converted Premul / Unpremul to SkSL
Bug: skia:
Change-Id: I4944badbb530e17b9ff7cca389f943e0b5982e01
Reviewed-on: https://skia-review.googlesource.com/72983
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-11-17 20:11:36 +00:00
Ethan Nicholas
8dca18ac7b converted GrAARectEffect to SkSL
Bug: skia:
Change-Id: I08254806fe7cb97dab21c5625aa16dd34aea9468
Reviewed-on: https://skia-review.googlesource.com/72120
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-11-16 21:54:38 +00:00
Chris Dalton
bbfd5161ed Don't use analytic clip FPs when drawing to stencil
It doesn't make sense to multiply by coverage when drawing to stencil.
This could theoretically work with FPs that discard and/or modify
the sample mask, but for the time being an analytic FP means one that
calculates a coverage value.

Bug: skia:7190
Change-Id: I44140a5823f8683ec08244bdf9d369f51fa05dd9
Reviewed-on: https://skia-review.googlesource.com/68362
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-11-07 21:30:44 +00:00
Chris Dalton
428e568fd8 Revert "Don't use analytic clip FPs when drawing to stencil"
This reverts commit 4c92d4aa3e.

Reason for revert: Chromecast bot failure

Original change's description:
> Don't use analytic clip FPs when drawing to stencil
> 
> It doesn't make sense to multiply by coverage when drawing to stencil.
> This could theoretically work with FPs that discard and/or modify
> the sample mask, but for the time being an analytic FP means one that
> calculates a coverage value.
> 
> Bug: skia:7190
> Change-Id: Ic40cf6c19c377cba80bad458993582f5cc07022a
> Reviewed-on: https://skia-review.googlesource.com/67423
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

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

Change-Id: Ie5bd4852c201e47daee0920f5644141bee2d8a46
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7190
Reviewed-on: https://skia-review.googlesource.com/68400
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-11-07 18:24:15 +00:00
Chris Dalton
4c92d4aa3e Don't use analytic clip FPs when drawing to stencil
It doesn't make sense to multiply by coverage when drawing to stencil.
This could theoretically work with FPs that discard and/or modify
the sample mask, but for the time being an analytic FP means one that
calculates a coverage value.

Bug: skia:7190
Change-Id: Ic40cf6c19c377cba80bad458993582f5cc07022a
Reviewed-on: https://skia-review.googlesource.com/67423
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-11-07 17:28:34 +00:00
Ethan Nicholas
14efcbf349 converted LumaColorFilterEffect to sksl
Bug: skia:
Change-Id: I208984ec9ad357249ee1b2fe28477f1450b4b69d
Reviewed-on: https://skia-review.googlesource.com/67848
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-11-07 14:55:18 +00:00
Brian Salomon
18923f9a2e Make GrAtlasTextBlob return to caller when a flush is required during subrun tessellation.
The old code used a helper object in the tessellation code that called flush() on GrAtlasTextOp.
A confusing aspect of this was that the pre-flush vertex data generated for the sub run was copied
to the op's vertex buffer after flush() had already recorded the draw that read the data.

The new code adds a tessellator nested helper class to GrAtlasTextBlob. The helper exits early if
a flush is required, the op performs the flush, and then the helper is invoked again until
tessellation is complete.

This also changes the blob object to use char* instead of unsigned char* for its vertex pointers.

Change-Id: I31bed251435f13b2172e6f5829ba437b882dd44d
Reviewed-on: https://skia-review.googlesource.com/67856
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2017-11-07 01:56:36 +00:00
Brian Salomon
943ed7910f Remove deferred upload types from GrDrawOp.h.
This is motivated by exposing these to an upcoming atlas text rendering API that doesn't use ops.

Change-Id: Id034dd43d13bc96fe1350fc6d8f699477bb74a05
Reviewed-on: https://skia-review.googlesource.com/65060
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-10-30 15:30:09 +00:00
Ethan Nicholas
d608c09ac5 Re-land "converted OverdrawColorFilter to SkSL"
This reverts commit 2d3cac58fc.

Bug: skia:
Change-Id: I6607d419f6b30c3e17b52ec5ce67d489bd1ad1dc
Reviewed-on: https://skia-review.googlesource.com/64080
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-10-26 14:58:27 +00:00
Ethan Nicholas
2d3cac58fc Revert "converted OverdrawColorFilter to SkSL"
This reverts commit 8aa4dc9052.

Reason for revert: strncmp getting mad

Original change's description:
> converted OverdrawColorFilter to SkSL
> 
> Bug: skia:
> Change-Id: Idcc0502758df1e60ed131a168b5c9a65a4d834a1
> Reviewed-on: https://skia-review.googlesource.com/63840
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ib78d7c878c4597918d059bddb4d61f6a7f59a511
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/63561
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-10-25 21:05:05 +00:00
Ethan Nicholas
8aa4dc9052 converted OverdrawColorFilter to SkSL
Bug: skia:
Change-Id: Idcc0502758df1e60ed131a168b5c9a65a4d834a1
Reviewed-on: https://skia-review.googlesource.com/63840
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-10-25 20:19:18 +00:00
Chris Dalton
c17bf32a1b Convert geometry shaders to operate in Skia device space
Defers the transformation to normalized window coordinates until after
the geometry shader. Merges vertex and a geometry shader builders into
a single compilation unit with a common base class.  Updates CCPR
geometry shaders accordingly.

Bug: skia:
Change-Id: If93c90e978b1fdc7120febd05cfb05810fd496b5
Reviewed-on: https://skia-review.googlesource.com/62980
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-25 15:59:18 +00:00
Brian Salomon
f3569f0f6d Add GrColorSpaceInfo and use in place of GrRenderTargetContext in paint conversion.
This moves us closer to making GrAtlasTextContext and related classes usable without a GrRenderTargetContext.

Change-Id: Ife52d69a3f925e23da88043acb4d8dc9f672a025
Reviewed-on: https://skia-review.googlesource.com/63304
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-10-24 20:43:02 +00:00
Chris Dalton
6a3dbeed00 Refactor CCPR coverage shaders for a vertex impl
Decouples geometry generation and analytic coverage. This paves the
way for a vertex shader implementation.

TBR=egdaniel@google.com

Bug: skia:
Change-Id: I2a183401bfe70b9f14b9b1cf035de6020a2135fa
Reviewed-on: https://skia-review.googlesource.com/60103
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-16 20:08:41 +00:00
Ethan Nicholas
823994624a converted GrRectBlurEffect to SkSL
Bug: skia:
Change-Id: I3a8e16fd2792e6fb5711815d8aad46ae30c2872e
Reviewed-on: https://skia-review.googlesource.com/59163
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-10-16 16:58:41 +00:00
Eric Boren
d6365e5fb8 Revert "Refactor CCPR coverage shaders for a vertex impl"
This reverts commit e501033bbd.

Reason for revert: Broke several bots

Original change's description:
> Refactor CCPR coverage shaders for a vertex impl
> 
> Decouples geometry generation and analytic coverage. This paves the
> way for a vertex shader implementation.
> 
> Bug: skia:
> Change-Id: I23b79d4397db22bd8fc063b8dfca58ab00037292
> Reviewed-on: https://skia-review.googlesource.com/59200
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

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

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

Bug: skia:
Change-Id: I314bf03fa6cbeceb1c527d4d9464147b2e8464c6
Reviewed-on: https://skia-review.googlesource.com/59821
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2017-10-16 12:53:14 +00:00
Chris Dalton
e501033bbd Refactor CCPR coverage shaders for a vertex impl
Decouples geometry generation and analytic coverage. This paves the
way for a vertex shader implementation.

Bug: skia:
Change-Id: I23b79d4397db22bd8fc063b8dfca58ab00037292
Reviewed-on: https://skia-review.googlesource.com/59200
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-10-15 04:13:06 +00:00
Ethan Nicholas
c9472af858 SkSL FPs now support child processors, converted ArithmeticFP to SkSL
Bug: skia:
Change-Id: I34ed3480073d05762a7d4692aeee4b87e454ce52
Reviewed-on: https://skia-review.googlesource.com/57961
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-10-11 18:05:07 +00:00
Brian Osman
099fa0fb98 Revert^6 "Make threaded proxy generation MDB-friendly, and defer instantiation"
ANGLE bots were getting lots of corrupted GMs - we set fPreferVRAMUseOverFlushes
to false. In that case, multiple deferred proxies were instantiating to the same
scratch resource. Any proxy that we're going to fill with an ASAP upload needs
to have no pending IO - we hoist all those loads to the front of the flush, so
normal IO tracking doesn't really help.

Bug: skia:
Change-Id: Id36fd8700e522db412a3c992b93c778e2ebb1188
Reviewed-on: https://skia-review.googlesource.com/53940
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-10-02 21:04:08 +00:00
Brian Osman
9b1f4bd176 Revert "Revert "Revert "Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation"""""
This reverts commit fdd2cb52b7.

Reason for revert: ANGLE gold failures

Original change's description:
> Revert "Revert "Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation""""
> 
> This reverts commit 9f8d4d36b5.
> 
> Bug: skia:
> Change-Id: I8d7c1df24d8b13b94404f3d9ba69a1ab55ee00c0
> Reviewed-on: https://skia-review.googlesource.com/52920
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

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

Bug: skia:
Change-Id: Ie461de167fbd37323cabd4adf064f99204ba4878
Reviewed-on: https://skia-review.googlesource.com/53801
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-10-02 14:00:07 +00:00
Brian Osman
fdd2cb52b7 Revert "Revert "Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation""""
This reverts commit 9f8d4d36b5.

Bug: skia:
Change-Id: I8d7c1df24d8b13b94404f3d9ba69a1ab55ee00c0
Reviewed-on: https://skia-review.googlesource.com/52920
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-09-29 13:48:54 +00:00
Brian Osman
9f8d4d36b5 Revert "Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation"""
This reverts commit e8b8397664.

Reason for revert: More crashing.

Original change's description:
> Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation""
> 
> This reverts commit 837c6c7c0c.
> 
> Bug: skia:
> Change-Id: I1821f1b2b772c67f1b749692b398eb757d8073c9
> Reviewed-on: https://skia-review.googlesource.com/52744
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

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

Change-Id: I1c8a81ed1000446c298d646d2cd5e7ebd212f18c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/52860
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-28 17:45:32 +00:00
Brian Osman
e8b8397664 Revert "Revert "Make threaded proxy generation MDB-friendly, and defer instantiation""
This reverts commit 837c6c7c0c.

Bug: skia:
Change-Id: I1821f1b2b772c67f1b749692b398eb757d8073c9
Reviewed-on: https://skia-review.googlesource.com/52744
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-28 17:19:58 +00:00
Brian Osman
837c6c7c0c Revert "Make threaded proxy generation MDB-friendly, and defer instantiation"
This reverts commit 742f3d02a1.

Reason for revert: Aaah!

Original change's description:
> Make threaded proxy generation MDB-friendly, and defer instantiation
> 
> Replaces GrPrepareCallback with GrDeferredProxyUploader, stored directly
> on GrTextureProxy. Op lists now store a list of referenced proxies that
> are being generated by worker threads. At flush time, iterate over those
> proxies, and invoke their uploader.
> 
> Lifetime of the uploader object is now tied to the proxy, but the ASAP
> upload function will free the proxy's uploader, if it's called.
> 
> Bug: skia:
> Change-Id: Ieb2c6a805d19990012839a8e103c3ca5b8d3dfc6
> Reviewed-on: https://skia-review.googlesource.com/49904
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: I8f76a67044dc4159f903097d8b1ef19ffb48c730
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/52760
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-28 15:14:40 +00:00
Brian Osman
742f3d02a1 Make threaded proxy generation MDB-friendly, and defer instantiation
Replaces GrPrepareCallback with GrDeferredProxyUploader, stored directly
on GrTextureProxy. Op lists now store a list of referenced proxies that
are being generated by worker threads. At flush time, iterate over those
proxies, and invoke their uploader.

Lifetime of the uploader object is now tied to the proxy, but the ASAP
upload function will free the proxy's uploader, if it's called.

Bug: skia:
Change-Id: Ieb2c6a805d19990012839a8e103c3ca5b8d3dfc6
Reviewed-on: https://skia-review.googlesource.com/49904
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-09-28 14:46:07 +00:00
Robert Phillips
420c4cfcd7 Add GrTextureProxyPriv
Several upcoming additions should go in here

Change-Id: I642f3c7cc36b1e6512ee0170640449e88a666d2c
Reviewed-on: https://skia-review.googlesource.com/52661
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-28 13:23:37 +00:00
Robert Phillips
ae7d3f3992 Add native caching of uniquely keyed GrTextureProxies (take 2)
TBR=bsalomon@google.com

Change-Id: I590dcdc85fb60706c7eb06277694791dc04c9141
Reviewed-on: https://skia-review.googlesource.com/49543
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-21 13:52:10 +00:00
Robert Phillips
76d640d14e Revert "Add native caching of uniquely keyed GrTextureProxies"
This reverts commit d4f100dad9.

Reason for revert: ASAN

Original change's description:
> Add native caching of uniquely keyed GrTextureProxies
> 
> Change-Id: I303fe025b7856b8d681a2d35b416c015bd468e1d
> Reviewed-on: https://skia-review.googlesource.com/48300
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I7bbf549d4855ce6d985867c3880eef80080bd3d1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/49442
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-20 20:50:50 +00:00
Robert Phillips
d4f100dad9 Add native caching of uniquely keyed GrTextureProxies
Change-Id: I303fe025b7856b8d681a2d35b416c015bd468e1d
Reviewed-on: https://skia-review.googlesource.com/48300
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-09-20 20:21:50 +00:00
Brian Osman
5d034744ab Do software clip mask generation with worker threads
Also refactor the prepare callback stuff to share logic
between software path rendering and clip mask generation.

Bug: skia:
Change-Id: I0c56c6df8703eb59d2d49a4c3985bd4f5ef20f01
Reviewed-on: https://skia-review.googlesource.com/44421
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-09-11 17:58:00 +00:00
Brian Salomon
2bbdcc44c6 Rework GrSamplerParams to be more compact and use its own wrap mode enum.
The main change is to make GrSamplerParams smaller by making its enums have byte-sized underlying types. The rest is cosmetic.

Change-Id: Ib71ea50612d24619a85e463826c6b8dfb9b445e3
Reviewed-on: https://skia-review.googlesource.com/43200
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-09-07 16:58:31 +00:00