Commit Graph

2209 Commits

Author SHA1 Message Date
Brian Salomon
559f556d9d Remove support for image load/store
This isn't used and has become a maintenance burden.

Change-Id: I5f3af8f91e5c4f073fe4ea30e0a7f1f61efeea47
Reviewed-on: https://skia-review.googlesource.com/70640
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-15 20:06:12 +00:00
Greg Daniel
33d17cbb00 Add private grpixelconfigs for alpha_8 and alpha_half
Bug: skia:
Change-Id: I5191b6e045aea2a5af2b305b5972ad1e638a7ace
Reviewed-on: https://skia-review.googlesource.com/71763
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-15 20:02:43 +00:00
Greg Daniel
ab081ae7e4 Move static helper functions for GrPixelConfig to private.
Bug: skia:
Change-Id: I207cce77cbe46e0016afe932a06dba12e732c5da
Reviewed-on: https://skia-review.googlesource.com/71281
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-14 17:14:34 +00:00
Greg Daniel
5254ccc181 Move pixel config getter to private in GrBackendSurface
We eventually want to remove pixel config from GrBackendSurface so this
helps to insure that clients don't rely on it.

Bug: skia:
Change-Id: I6b8435d12347fab62c0f9032addea1211aa703ca
Reviewed-on: https://skia-review.googlesource.com/70642
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-13 20:39:51 +00:00
Greg Daniel
037d1fc453 Use vulkan prototypes for android framework build
The framework still directly calls vulkan vkGetInstanceProcAddr (and device).

Bug: skia:
Change-Id: Ie20a4fc4f58d0f51f995605dc8464a4e26b76602
Reviewed-on: https://skia-review.googlesource.com/69923
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-11-10 18:31:47 +00:00
Greg Daniel
83bd441480 Set VK_NO_PROTOTYPES for vulkan backend
Bug: skia:
Change-Id: Id740efe6030b70271b0eb3a3bd6a111202f28fd8
Reviewed-on: https://skia-review.googlesource.com/69160
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2017-11-10 15:47:37 +00:00
Brian Salomon
821ef188b3 Allow mock GrContexts to "support" shader derivatives
Change-Id: I0d8dce5e0873a058b59baae9c35903b2444a76fd
Reviewed-on: https://skia-review.googlesource.com/68480
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-11-08 12:46:26 +00:00
Brian Salomon
af59748114 Add GrContextOptions to control distance field thresholds for small sizes and fallback to paths.
Change-Id: Ib57c40b1b50c5afe079b2099d1a83986629ea287
Reviewed-on: https://skia-review.googlesource.com/68217
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-08 01:34:06 +00:00
Chris Dalton
fddb6c0399 Setup CCPR testing with GrMockContext
Beefs up the mock context to be able to support CCPR, sets up a
framework for testing CCPR with the mock context, and adds a new test.

Bug: skia:
Change-Id: If95f92726f7b1a7f52ad04ca8126551f58ea8032
Reviewed-on: https://skia-review.googlesource.com/67980
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-11-06 20:44:19 +00:00
Brian Salomon
9f545bc18a Modify fontcache GM to actually spill atlas.
Adds an option to GrDrawOpAtlas to disable multitexturing.

Adds option to GrContextOptions to disable multitexturing for glyph atlases.


Change-Id: If413ab7061538fa0e75628d252be4fd14215b6ba
Reviewed-on: https://skia-review.googlesource.com/67802
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-11-06 16:06:09 +00:00
Jim Van Verth
6a40abc8c7 Revert "Implement window rectangles in vulkan"
This reverts commit 94c0468b2b.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Implement window rectangles in vulkan
> 
> Bug: skia:
> Change-Id: I32c079b90a5503c797dfc073a093f940cd8c550a
> Reviewed-on: https://skia-review.googlesource.com/65423
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I5a90cb57fb5d4bcf8c7e76a5f71a7f16edbaf6be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/67060
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-11-02 16:56:19 +00:00
Chris Dalton
94c0468b2b Implement window rectangles in vulkan
Bug: skia:
Change-Id: I32c079b90a5503c797dfc073a093f940cd8c550a
Reviewed-on: https://skia-review.googlesource.com/65423
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-11-02 15:27:21 +00:00
Ethan Nicholas
d1b2eec0d0 API to cache shader binaries between runs of Skia.
This CL does not include an actual implementation of said cache.
Stan is working on the cache implementation on the Android side of
things.

Bug: skia:
Change-Id: Iabe4f19b2dbacaaa1ead8bb3fa68d88c687b9a84
Reviewed-on: https://skia-review.googlesource.com/54780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-11-02 13:07:41 +00:00
Greg Daniel
45d6303f6e Have mip status match surface when snapping image from wrapped object
Also fixes some bugs involved with creating mipped SkSurfaces.

Bug: skia:
Change-Id: I6e0109000eadd2bdee4a907d3ee2231104528165
Reviewed-on: https://skia-review.googlesource.com/65063
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-30 20:06:53 +00:00
Greg Daniel
e252f08982 Add hint to SkSurface::MakeRenderTarget that we will use mips
Additionally this changed triggered a cascade of plumbing GrMipMapped
down throughout Ganesh.

Bug: skia:
Change-Id: I4181f44d9046d66139bb491c7abf86703305aaeb
Reviewed-on: https://skia-review.googlesource.com/63000
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-23 20:25:59 +00:00
Brian Salomon
43f8bf0f78 Move clear-as-draw workaround to GrGLGpu and expose via GrContextOptions.
Bug: skia:7154
Change-Id: I23ffc11dab4a377fbd6b7e4e33722b3fa0793d58
Reviewed-on: https://skia-review.googlesource.com/60681
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-10-18 12:55:06 +00:00
Eric Karl
914a36b248 MakeBackendTextureFromSkImage
Creates a static function on SkImage which converts the SkImage to a
GrBackendTexture. The texture is unowned by Skia, and must be deleted
by the caller. Allows for a no-copy / no-conversion fast path if the
provided image is unowned (unique()) and texture backed.

Change-Id: I8a48f9cc39de792725cd72057d98cd1c4594daab
Reviewed-on: https://skia-review.googlesource.com/52440
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Eric Karl <ericrk@chromium.org>
2017-10-12 20:05:31 +00:00
Greg Daniel
177e695589 Add flag on GrBackendTexture to say whether texture is mipped or not
Bug: skia:
Change-Id: Ia684e3daf779ec2feaaec64c04dabf5cb03cd07a
Reviewed-on: https://skia-review.googlesource.com/57821
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-12 17:02:41 +00:00
Greg Daniel
0fc4d2d269 Use enum to track MipMapsStatus throughout Texture creation
Bug: skia:
Change-Id: I1de1105d74b45f7b02ff52e6b8333801d98ef1ce
Reviewed-on: https://skia-review.googlesource.com/58501
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-10-12 16:12:42 +00:00
Brian Salomon
0b4d8aa108 Add benchmark for comparing multitexturing to non-multitexturing image draws.
Allows benchmarks to override GrContextOptions.

Removes the ability to use the same GrContext for all benchmarks in a config.

Change-Id: I5ab9f6e81055451ac912a66537843d1a49f3b479
Reviewed-on: https://skia-review.googlesource.com/34080
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-10-11 20:32:49 +00:00
Greg Daniel
834f12076f Set correct mip map status on GrTexture since we no longer require all mip data
Bug: skia:
Change-Id: I5074028f307187eef3201523cbd1ddc7d9bf9013
Reviewed-on: https://skia-review.googlesource.com/54102
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-10-10 16:45:43 +00:00
Ben Wagner
63fd760a37 Remove trailing whitespace.
Also adds a presubmit to prevent adding trailing whitespace to source
code in the future.

Change-Id: I41a4df81487f6f00aa19b188f0cac6a3377efde6
Reviewed-on: https://skia-review.googlesource.com/57380
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-10-09 21:20:34 +00:00
Greg Daniel
e1da1d9a7d Add option to create a deferred render target context with mips
We need this since we have texture generators that draw the base level
but nothing more. Thus we want them to be able to directly draw into
a pre allocated mipped target instead of doing a copy later.

TBR: bsalomon@google.com
Bug: skia:
Change-Id: I1dfae0da7153b21b30fdfa51a7061fc255739a1e
Reviewed-on: https://skia-review.googlesource.com/54100
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-10-06 20:28:00 +00:00
Chris Dalton
f1b47bb299 Add a cap for geometry shader invocations
Bug: skia:7116
Change-Id: I3cc2ce7b2e5123c9adfd9781b2a5a8553747dfa5
Reviewed-on: https://skia-review.googlesource.com/56000
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-10-06 18:43:06 +00:00
Chris Dalton
e4679fa06a CCPR: Blacklist Mali GPUs and Vulkan while we work through issues
Bug: skia:
Change-Id: I59dfb1c839a66a6aa6c954e4a544930fc1376a22
Reviewed-on: https://skia-review.googlesource.com/53560
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-09-29 20:25:34 +00:00
Greg Daniel
bb76ace72b Fall back to non mipped Texture when we can't copy base to mipped texture
TBR: bsalomon@google.com
Bug: skia:7094
Change-Id: I9d2ba78c4d4332a22e2357cde0598de51299067d
Reviewed-on: https://skia-review.googlesource.com/53541
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-09-29 20:19:14 +00:00
Brian Osman
36dcd7f25d Enable caching of path mask textures by default
TBR=bsalomon@google.com
Bug: skia:
Change-Id: If12c3b44de76a2fed24dd527cb774fe5be270e8e
Reviewed-on: https://skia-review.googlesource.com/52260
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-28 13:06:57 +00:00
Ethan Nicholas
fa7ee2447e changed vertex attribute precisions to be actual types
Bug: skia:
Change-Id: Ic5555d9f1be7f24655bdea9f2a3677bfb128ef70
Reviewed-on: https://skia-review.googlesource.com/50221
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-09-27 14:04:17 +00:00
Greg Daniel
e2d76d5ffe Remove fIsMipMapped from GrSurfaceDesc
Part 3 of 3 for relanding of https://skia-review.googlesource.com/c/skia/+/42083

Bug: skia:
Change-Id: I98c5406015213df5d11a0101df8722da6845157e
Reviewed-on: https://skia-review.googlesource.com/44464
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-09-26 18:17:37 +00:00
Brian Salomon
4127456bd6 Disable flat interpolation in TextureOp on Qualcomm
Change-Id: I335fa9731cbf449989242f7e81096248abc90e90
Reviewed-on: https://skia-review.googlesource.com/46980
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-09-15 17:07:33 +00:00
Greg Daniel
21918231b2 Revert "Remove isMipMapped from GrSurfaceDesc" and follow up find exact scratch CL
This reverts commit 52cb5fe23b.
This reverts commit e1fbf17058.

TBR:bsalomon@googole.com

Bug: chromium:763333
Change-Id: Ie94e00c3c7231e32f009b9dc7bb51ebb53baf7b1
Reviewed-on: https://skia-review.googlesource.com/44400
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-09-08 19:58:18 +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
Greg Daniel
52cb5fe23b Remove isMipMapped from GrSurfaceDesc
Bug: skia:
Change-Id: Id3864aad7ff9636362c9c54ef411a02af9c83fbf
Reviewed-on: https://skia-review.googlesource.com/42083
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-09-06 14:41:18 +00:00
Robert Phillips
bdda0ba155 Cosmetic changes to GrDrawOpAtlas
It looks like we won't be going in the direction of:

https://skia-review.googlesource.com/c/skia/+/35962 (Allow GrDrawOpAtlas to grow & shrink)

Pull out what is worth keeping.

TBR=bsalomon@google.com

Change-Id: Ia14c3c621e7b1d2d7f303a455a3e4d9660af5f6e
Reviewed-on: https://skia-review.googlesource.com/41362
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2017-09-01 16:24:48 +00:00
Brian Salomon
f43d0001e4 Revert "Revert "Revert "Revert "Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget.""""
This reverts commit 6df4d6be0d.

Reason for revert: Google3 fix landed

Original change's description:
> Revert "Revert "Revert "Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget."""
> 
> This reverts commit 71554bc256.
> 
> Reason for revert: Google3
> 
> Original change's description:
> > Revert "Revert "Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget.""
> > 
> > This reverts commit 807371c15b.
> > 
> > Docs-Preview: https://skia.org/?cl=40260
> > Change-Id: I28e0434c455155ff39a5aaa4141abdf442474e87
> > Reviewed-on: https://skia-review.googlesource.com/40260
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> 
> TBR=egdaniel@google.com,bsalomon@google.com
> 
> Change-Id: Ifdfa896a70db69935473276d12dce54de5c6b6f7
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/41500
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: I827419bb19972c3644929a8c984bb9534baab0ba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/41700
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-31 20:04:12 +00:00
Brian Salomon
6df4d6be0d Revert "Revert "Revert "Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget."""
This reverts commit 71554bc256.

Reason for revert: Google3

Original change's description:
> Revert "Revert "Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget.""
> 
> This reverts commit 807371c15b.
> 
> Docs-Preview: https://skia.org/?cl=40260
> Change-Id: I28e0434c455155ff39a5aaa4141abdf442474e87
> Reviewed-on: https://skia-review.googlesource.com/40260
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ifdfa896a70db69935473276d12dce54de5c6b6f7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/41500
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-31 15:57:42 +00:00
Robert Phillips
cb2e235e6f Reduce stencil buffer clearing
TBR=bsalomon@google.com
Bug: skia:6953
Change-Id: I079f90711297ee290f2d4011cfcb18b764554deb
Reviewed-on: https://skia-review.googlesource.com/40691
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-08-30 21:17:36 +00:00
Brian Osman
195c05b6d5 Move several GrContextOptions fields behind GR_TEST_UTILS
Bug: skia:
Change-Id: I35bc08ad72fb94d8e47fe342d314c4496b954226
Reviewed-on: https://skia-review.googlesource.com/40881
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-30 19:35:27 +00:00
Brian Osman
c0e66273f8 Make AA hairline renderer non-optional
Change-Id: I0d4166a4e9ea894f479755f9f7137c5941cf8a22
Reviewed-on: https://skia-review.googlesource.com/41081
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-30 19:05:27 +00:00
Brian Salomon
71554bc256 Revert "Revert "Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget.""
This reverts commit 807371c15b.

Docs-Preview: https://skia.org/?cl=40260
Change-Id: I28e0434c455155ff39a5aaa4141abdf442474e87
Reviewed-on: https://skia-review.googlesource.com/40260
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-30 17:59:46 +00:00
Robert Phillips
fb4a20c7f5 Remove kDefault_GrSurfaceOrigin
Change-Id: Ic55d488287add32e5a32b5a77415e16cebf4c1ee
Reviewed-on: https://skia-review.googlesource.com/29120
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-08-30 11:30:32 +00:00
Brian Osman
b350ae24d5 Add GrContextOption to disable distance field path renderer
We're going to hide the path renderer bitfield behind a testing-only flag,
but clients may want to suppress this path renderer in particular, so a
dedicated flag makes sense.

Bug: skia:
Change-Id: I6cc4049243b5d3c129a824dfe7c1a65a70a05ccd
Reviewed-on: https://skia-review.googlesource.com/40083
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-29 20:41:01 +00:00
Brian Osman
8b0f265f70 Always include the default path renderer in the chain
This (plus SW) ensures that we can always draw any path. Changed the path
renderer command line flags so that 'default' means everything but CCPR,
and 'All' really means 'every path renderer'.

Bug: skia:
Change-Id: I2801d1c50ab939f23efb4600e0f90e6add2891b7
Reviewed-on: https://skia-review.googlesource.com/40221
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-29 19:37:32 +00:00
Brian Osman
ef45e6eb58 Remove (unused) context option to remove shader swizzling
Bug: skia:
Change-Id: I0372f7782124c096370b42624b6c0a3aff8a90b0
Reviewed-on: https://skia-review.googlesource.com/40101
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-29 19:34:51 +00:00
Robert Phillips
b0e93a22bb Remove origin field from GrSurface (take 2)
This mainly consists of rm origin from GrSurface and the wrapBackEnd*
methods and then re-adding an explicit origin parameter to all the
GrGpu methods that need it.

TBR=bsalomon@google.com

Change-Id: I4248b2a4749ef844da4233ce53b0dc504bc9eb74
Reviewed-on: https://skia-review.googlesource.com/30280
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-08-29 17:36:31 +00:00
Ben Wagner
a93a14a998 Convert NULL and 0 to nullptr.
This was created by looking at warnings produced by clang's
-Wzero-as-null-pointer-constant. This updates most issues in
Skia code. However, there are places where GL and Vulkan want
pointer values which are explicitly 0, external headers which
use NULL directly, and possibly more uses in un-compiled
sources (for other platforms).

Change-Id: Id22fbac04d5c53497a53d734f0896b4f06fe8345
Reviewed-on: https://skia-review.googlesource.com/39521
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-28 17:48:57 +00:00
Brian Osman
5127998795 Add an (optional) SkTaskGroup to GrContext
GrContextOptions has an SkExecutor field, allowing clients to supply a
thread pool. If present, the GrContext will create an SkTaskGroup that
can be used for internal threading work.

Bug: skia:
Change-Id: I8b01245515a21a83f9fe838caf0a01c9a26c0003
Reviewed-on: https://skia-review.googlesource.com/37580
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-23 14:33:25 +00:00
Ben Wagner
b4aab9ae6d Replace SkFAIL with SK_ABORT.
SkFAIL is a legacy macro which is just SK_ABORT. This CL mechanically
changes uses of SkFAIL to SK_ABORT in preparation for its removal. The
related sk_throw macro will be changed independently, due to needing to
actually clean up its users.

Change-Id: Id70b5c111a02d2458dc60c8933f444df27d9cebb
Reviewed-on: https://skia-review.googlesource.com/35284
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-16 15:37:54 +00:00
Brian Salomon
aff329b8e9 Make GrFragmentProcessor be non-refcounted and use std::unique_ptr.
Change-Id: I985e54a071338e99292a5aa2f42c92bc115b4008
Reviewed-on: https://skia-review.googlesource.com/32760
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-08-11 14:13:26 +00:00
Brian Osman
71a1889a14 Revert "Revert "GrContext::dump that produces JSON formatted output""
This reverts commit 0f450acd76.

Bug: skia:
Change-Id: I97428fbbc6d82bf8b186ec5fdbf1a939c00e4126
Reviewed-on: https://skia-review.googlesource.com/32726
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-10 15:42:25 +00:00