Commit Graph

2582 Commits

Author SHA1 Message Date
Robert Phillips
87685ba492 Add isTextureable parameter to GrContextThreadSafeProxy::createCharacterization
Change-Id: I08d263490982a7d5c1e48a5b31acca25405ab09a
Reviewed-on: https://skia-review.googlesource.com/c/188628
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-02-01 21:42:11 +00:00
Robert Phillips
fd0d97092b Rename GrContext::uniqueID to contextID and hide it
The GrContext's ID isn't really unique any more (since it can be shared among a family of contexts). Change its name to reflect the new reality.

Additionally, no client seems to be using it so make it private.


Change-Id: Ibb9004d699fe6ca7876b3be94142e612b5b9efbd
Reviewed-on: https://skia-review.googlesource.com/c/188308
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-02-01 16:18:23 +00:00
Robert Phillips
4217ea7ee5 Add outline of new GrContext hierarchy
This begins the process of splitting GrContext into:

GrContext_Base, GrImageContext, GrRecordingContext and GrDirectContext.

Change-Id: I3c43045f2a5549b049e95791d65f74d4e16de36f
Reviewed-on: https://skia-review.googlesource.com/c/186878
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-01-30 18:36:11 +00:00
Robert Phillips
a0bc39dce3 Split GrContextThreadSafeProxy into its own files (take 2)
This just shuffles stuff around.

Change-Id: I90e24a73bf44dd3e88fc121a0528bf94e4fdead4
Reviewed-on: https://skia-review.googlesource.com/c/187786
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-01-29 19:26:47 +00:00
Robert Phillips
ea8b4fc950 Revert "Split GrContextThreadSafeProxy into its own files"
This reverts commit f8397f2b3f.

Reason for revert: Breaking Flutter build!

Original change's description:
> Split GrContextThreadSafeProxy into its own files
> 
> This just shuffles stuff around.
> 
> Change-Id: Ieab35f50945efe87512d7077cb994132f0e0b6ef
> Reviewed-on: https://skia-review.googlesource.com/c/186874
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

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

Change-Id: I236add95d8a0066037854b5532a7db131d93d603
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/187783
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-01-29 14:39:19 +00:00
Robert Phillips
f8397f2b3f Split GrContextThreadSafeProxy into its own files
This just shuffles stuff around.

Change-Id: Ieab35f50945efe87512d7077cb994132f0e0b6ef
Reviewed-on: https://skia-review.googlesource.com/c/186874
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-01-29 14:03:47 +00:00
Greg Daniel
41f0e28fd5 Add MaxAPIVersion to GrVkBackendContext.
This moves us to the correct way of handling the correct version of
Vulkan that the client wants us to use.

Bug: skia:
Change-Id: I6c7962b5d2d48ae142c6a701c30f5af3801ac99b
Reviewed-on: https://skia-review.googlesource.com/c/187382
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-01-28 19:01:46 +00:00
Brian Salomon
35ba614dc5 Remove GrGpuResource::abandon from the public API.
Bug: skia:7966
Change-Id: I222db4f4bc765fad3e5f1461f3a8f3c663bb9429
Reviewed-on: https://skia-review.googlesource.com/c/186545
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-01-25 15:37:20 +00:00
Brian Salomon
9bc76d96f9 Change the meaning of GrBudgetedType::kUnbudgetedUncacheable.
kUnbudgetedCacheable now means that the resource is never purged
until its unique key is removed.

This fixes an issue where a cached texture for a promise image
might get purged by cache pressure. This in turn could cause
Skia to call the promise image's Fulfill proc multiple times with
no intervening Release calls. The balancing Release calls would
occur, but the policy is that each Fulfill should be balanced by
Release *before* another Fulfill.

Update/add unit tests.

Bug: chromium:922851
Change-Id: I6411e413b3104721ca4bb6e7f07b3b73d14cbcf9
Reviewed-on: https://skia-review.googlesource.com/c/186361
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-01-25 14:13:00 +00:00
Brian Salomon
aa6ca0a8bf Require explicit GrWrapCacheable specification in more places.
Make all wrapped resources be kUnbudgetedUncacheable except those
created by AHardwareBuffer image generators and as backings for promise
images.

Make all non-wrapped unbudgeted resources be kUnbudgetedUncacheable.

Update unit tests to mostly use GrWrapCacheable::kNo except where they
are testing the distinction.

Update unit tests for new expectations.
Bug: chromium:922851
Change-Id: I4d3bdaa161ffc76390f26334bcb7e2b47dd9319d
Reviewed-on: https://skia-review.googlesource.com/c/185004
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-01-25 00:29:27 +00:00
Brian Salomon
fa2ebeaf33 Replace bool purgeImmediately with enum GrWrapCacheable.
Store budgeted status as a tri-state enum on GrGpuResource:
kBudgeted
kUnbudgetedCacheable
kUnbudgetedUncacheable

Uncacheable vs. Cacheable captures the current distinction between
wrapped resources created with purgeImmediately or !purgeImmediately.

Non-wrapped and unbudgeted resources are all kUnbudgetedCacheable to
match current behavior.

This change just introduces the new types. No behavior is changed.

Bug: chromium:922851

Change-Id: Ic2387bf321cf9b56b4c9ffd9dbef8ade60f9cb98
Reviewed-on: https://skia-review.googlesource.com/c/185003
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-01-24 21:26:24 +00:00
Brian Salomon
1bf0ed8584 Make GrTexture caching for SkPromiseImageTexture work when same texture
fulfills a different SkImage.

Bug: skia:8613
Change-Id: I7ee14112c69f8aaef223a37dda455259b501a2bf
Reviewed-on: https://skia-review.googlesource.com/c/184440
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-01-16 22:06:53 +00:00
Herb Derby
081e6f3754 Rename GrGlyphCache -> GrStrikeCache
Change-Id: Ie6fdcc6ce1f2265783ebb4dcd1b1ce087a296ddf
Reviewed-on: https://skia-review.googlesource.com/c/184500
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-01-16 20:15:04 +00:00
Michael Ludwig
a21d196602 Move clear-as-draw caps into GrCaps
Bug: skia:
Change-Id: Ib029f337f5e61366e2550e77dc99310b44d03f84
Reviewed-on: https://skia-review.googlesource.com/c/182970
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-01-14 15:27:44 +00:00
Brian Osman
c6444d2f26 Enable wide color support in CCPR
Unlike other ops, always use half-float colors. The logic around the
Instance struct makes dynamically switching color size tricky.
CCPR stores color in a per-instance attribute though, so the cost of
always using FP16 is much lower.

Bug: skia:
Change-Id: I9c0c64940f74f915a18417a5830030558e065d28
Reviewed-on: https://skia-review.googlesource.com/c/182760
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-01-10 13:53:31 +00:00
Greg Daniel
a870b46c79 Add ability to write out VkPipelineCache to gpu PersistentCache.
Bug: skia:
Change-Id: Id13d680401f69a074ae0c85f9ceaf3308fccb129
Reviewed-on: https://skia-review.googlesource.com/c/181403
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2019-01-08 21:18:51 +00:00
Greg Daniel
bc84adceaa Move GrVkSecondaryCBDrawContext header into src to hide it.
We want to hide this API from general public use. Chromium can dig into
skia to include it as it does with other Skia API's that are in src

Bug: skia:
Change-Id: I00dc36d181237ea0785eefb31ad6c2d4e50e3c68
Reviewed-on: https://skia-review.googlesource.com/c/180648
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-01-02 22:58:58 +00:00
Greg Daniel
b46add81de Add initial support for creating a vulkan secondary command buffer drawing context.
This sets up the context and adds support for creating RTContexts, RTProxies, RTs,
and GrVkRenderPass's that wrap the external secondary command buffer.

Bug: skia:
Change-Id: I80ebbb690a5fe464f775c5fcad651dfe2a150418
Reviewed-on: https://skia-review.googlesource.com/c/178926
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-01-02 20:39:23 +00:00
Greg Daniel
487132b828 Don't include system vulkan header when building skia files.
With this change clients will still have to have vulkan/vulkan_core.h
on their include path when compiling files that include Skia. However,
it will not be required when compiling Skia files.

Bug: skia:
Change-Id: I1cd75f4f18d3097c8a1606c3e8a51a371b01b565
Reviewed-on: https://skia-review.googlesource.com/c/179560
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-12-27 19:21:00 +00:00
Brian Salomon
b4ba8269b2 Move GrResourceKey.h to include/private.
Change-Id: I87cebe1ba69afe3ff51e4f7b504e8caa0ade063f
Reviewed-on: https://skia-review.googlesource.com/c/179733
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
2018-12-21 15:26:18 +00:00
Brian Salomon
614c1a838a Add idle texture callback mechanism.
A proc can be registered with a GrTexture. The proc will be called when
it is safe to delete the texture is "idle." Idle means it referred to
outside of GrResourceCache and that the I/O operations on the GPU are
completed (this latter part applieas to Vulkan only).

The intended use case for this is to call promise image texture release
procs once we start caching GrTextures for deinstantiated promise
images.

Bug= skia:8613

Change-Id: Idce9a4292fef7b15370a053060d8878a9d6828fa
Reviewed-on: https://skia-review.googlesource.com/c/178937
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-12-19 21:12:42 +00:00
Brian Salomon
88f1fa54fd Infer GL null buffer hint usage from whether on command buffer or WebGL.
Change-Id: I7d93fabf5d4cc427cef8130fd0a3e8765e4b3693
Reviewed-on: https://skia-review.googlesource.com/c/179248
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-12-19 20:28:05 +00:00
Brian Salomon
77e1ccf3cd Make requiring VBOs a runtime rather than compile time decision.
Change-Id: I764f8f342ae212df66f647e005ff237c41411b75
Reviewed-on: https://skia-review.googlesource.com/c/179202
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-12-19 15:54:35 +00:00
Brian Salomon
2cb3b9535b Remove GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE flag.
Enough's enough. It's been a long time since the standard was updated.

Change-Id: I49ae08ee49f06cb8403c9cb72a811edd35b25575
Reviewed-on: https://skia-review.googlesource.com/c/178930
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-12-19 14:15:01 +00:00
Brian Salomon
acb056eb78 Remove unused macro GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT
Change-Id: I697e34c779112a01b36580a2f22ebce420542e33
Reviewed-on: https://skia-review.googlesource.com/c/178933
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-12-18 18:44:13 +00:00
Brian Salomon
34a2030d0a Remove window rects flag from GrInternalSurfaceFlags.
This flag is annoying to set correctly when writing test code.
Fortunately it has become redundant with the "is GL FBO 0" flag.

Change-Id: Ifd88292d2d6ea05bfe0d269e853baff857e70bfe
Reviewed-on: https://skia-review.googlesource.com/c/178929
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-12-18 18:17:03 +00:00
Herb Derby
880979f32c Fix 64-bit truncate warning
BUG=chromium:910360

Change-Id: Ibd353d851626cca1b44bcfe38de5039a772bc6f0
Reviewed-on: https://skia-review.googlesource.com/c/178284
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-12-18 01:11:02 +00:00
Brian Salomon
f391d0f771 Reduce the number of backend->pixelconfig GrCaps virtuals.
Moves method to get GrBackendFormat from GrBackendTexture from GrCaps
to GrBackendTexture so that a GrContext is not required.

Uses kUnknown_GrPixelConfig as failure return from GrCaps functions
rather than an GrPixelConfig* out param and bool result.

Having the texture type be part of GrBackendFormat made removing the
GrCaps function that goes from GrBackendRenderTarget to GrPixelConfig
awkward so that was left alone for now.

Change-Id: If9be0f898c538be4a7b24022b6011f63441a0317
Reviewed-on: https://skia-review.googlesource.com/c/175991
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-12-14 17:12:36 +00:00
Ethan Nicholas
8e265a7520 Re-land "Perform Vulkan resets in a background thread"
Bug: skia:
Change-Id: I1c7ec365a370137ca64d9091cb60e6430c3f1c28
Reviewed-on: https://skia-review.googlesource.com/c/177069
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-12-13 20:24:22 +00:00
Greg Daniel
54200e4025 Move vulkan headers from third_party to include/third_party.
Bug: skia:
Change-Id: I7174c6da075c0fd3d6238a5556439f42d6b97659
Reviewed-on: https://skia-review.googlesource.com/c/176680
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-12-12 14:16:43 +00:00
Brian Salomon
9f7d9a2776 Revert "Move some Gr headers from include/gpu to include/private and src/gpu."
This reverts commit 3bdc3f5f9c.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Move some Gr headers from include/gpu to include/private and src/gpu.
> 
> Bug: skia:
> Change-Id: I341dd3bff63cc99d3be830e21673073645a9cfec
> Reviewed-on: https://skia-review.googlesource.com/c/176220
> Auto-Submit: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: Ia7082f66abb969b20dd5d1f12c3c8d09cd84c241
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/176587
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-12-11 19:01:41 +00:00
Brian Salomon
3bdc3f5f9c Move some Gr headers from include/gpu to include/private and src/gpu.
Bug: skia:
Change-Id: I341dd3bff63cc99d3be830e21673073645a9cfec
Reviewed-on: https://skia-review.googlesource.com/c/176220
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-12-11 15:23:48 +00:00
Brian Salomon
3ccaa88c50 Add SK_API to GrTexture.
Sadly, we still expose this Chrome.

Bug: chromium:911856
Change-Id: Ib266eb1a338db621385cd75dbba6e709dd01587c
Reviewed-on: https://skia-review.googlesource.com/c/175999
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
2018-12-10 19:32:08 +00:00
Michael Ludwig
f23a152715 Reland "Add clamp to border wrap mode to gpu"
This reverts commit 8137f3c862.

Reason for revert: update GrCaps clampToBorder for iOS and Mac 10.11

Original change's description:
> Revert "Add clamp to border wrap mode to gpu"
>
> This reverts commit f49a5785f3.
>
> Reason for revert: clamp-to-border in metal not available on iOS
>
> Original change's description:
> > Add clamp to border wrap mode to gpu
> >
> > Bug: skia:
> > Change-Id: I286163cdea4fa8f7e6a876baaa11aa3dacd4f2ff
> > Reviewed-on: https://skia-review.googlesource.com/c/175244
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,ethannicholas@google.com,michaelludwig@google.com
>
> Change-Id: I01ef28d9c2fbf6c6dcd82d9aac193ff102d60151
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/c/175988
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

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

Change-Id: I37467eb096fec28131587aefe340f0485fca59d4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/175989
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2018-12-10 16:59:37 +00:00
Michael Ludwig
8137f3c862 Revert "Add clamp to border wrap mode to gpu"
This reverts commit f49a5785f3.

Reason for revert: clamp-to-border in metal not available on iOS

Original change's description:
> Add clamp to border wrap mode to gpu
> 
> Bug: skia:
> Change-Id: I286163cdea4fa8f7e6a876baaa11aa3dacd4f2ff
> Reviewed-on: https://skia-review.googlesource.com/c/175244
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

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

Change-Id: I01ef28d9c2fbf6c6dcd82d9aac193ff102d60151
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/175988
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2018-12-10 15:14:48 +00:00
Brian Salomon
0a7e58f4c9 Add glTexParameterf[v] to GrGLInterface
Change-Id: Icd1f2a84f76cedfdb9dfd358e57e0fbc6cae49cb
Reviewed-on: https://skia-review.googlesource.com/c/175828
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
2018-12-10 14:50:23 +00:00
Michael Ludwig
f49a5785f3 Add clamp to border wrap mode to gpu
Bug: skia:
Change-Id: I286163cdea4fa8f7e6a876baaa11aa3dacd4f2ff
Reviewed-on: https://skia-review.googlesource.com/c/175244
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2018-12-10 14:45:48 +00:00
Brian Osman
f5bbf66eb4 Finish removing sample shading support
Chrome's initialization of the function pointer is gone:
https://chromium-review.googlesource.com/c/chromium/src/+/1366758

Bug: skia:
Change-Id: I025db12fbf8cfbcaee580b3494bd56e41b8fd325
Reviewed-on: https://skia-review.googlesource.com/c/175982
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-12-10 14:28:19 +00:00
Greg Daniel
d207345456 Add cap to number of oplists we execute before flushing to the gpu.
This fixes a crash we saw when we switch vulkan copies as draws to creating
their own secondary command buffer. The crash came from the perf blendmode
tests when using an advanced blend mode. They would do 1000 draws which forced
us into creating 2000 command buffers (since the dst copies and the normal draws
each used them). I tested without the copies as draws change and just increasing
the total number of draws we do and was able to repro the crash.

Besides fixing the above OOM crash, I am also seeing a 5-10% perf gain on the
blendmode micro benches which is nice

Bug: skia:
Change-Id: I9266ea0ba02a755f54dabd4ee804963ab0c9b684
Reviewed-on: https://skia-review.googlesource.com/c/175436
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-12-07 17:57:07 +00:00
Brian Osman
a63593a10c Remove sample shading and dest color override
Both of these features are unused (though Chrome still installs a GL
function in the interface, so the function pointer needs to stick around
until that's removed).

Bug: skia:
Change-Id: Id061e83042b0dd5f583a850de182c29cd27fab1f
Reviewed-on: https://skia-review.googlesource.com/c/175423
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-12-07 15:46:12 +00:00
Brian Salomon
c67c31ced1 Revert "Revert "Mark wrapped textures imported into SkImages as "read only".""
This reverts commit ff4ccaa9fc.

Bug: skia:8509
Change-Id: If4a059d6e6e412ec1d6be2c70663d59c362e91d2
Reviewed-on: https://skia-review.googlesource.com/c/175249
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-12-06 15:34:31 +00:00
Brian Salomon
ff4ccaa9fc Revert "Mark wrapped textures imported into SkImages as "read only"."
This reverts commit 796693af3c.

Reason for revert: texture flags assertion in DDL config

Original change's description:
> Mark wrapped textures imported into SkImages as "read only".
> 
> Read only textures and proxies fail writePixels, as copy dsts, and mip
> regeneration.
> 
> Bug: skia:8509
> 
> Change-Id: Iaa0b473cc9a9930fde3ef0e91373d5040650de35
> Reviewed-on: https://skia-review.googlesource.com/c/174316
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: If5cb36e83795656185ff8d26e4ef2c52a2695a09
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8509
Reviewed-on: https://skia-review.googlesource.com/c/174846
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-12-05 21:35:40 +00:00
Brian Salomon
796693af3c Mark wrapped textures imported into SkImages as "read only".
Read only textures and proxies fail writePixels, as copy dsts, and mip
regeneration.

Bug: skia:8509

Change-Id: Iaa0b473cc9a9930fde3ef0e91373d5040650de35
Reviewed-on: https://skia-review.googlesource.com/c/174316
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-12-05 20:12:42 +00:00
Greg Daniel
b353eeb716 Remove duplicate member of GrVkDrawableInfo struct.
Bug: skia:
Change-Id: I81a38f9920f89f4749fc58458b85a29714cec7a9
Reviewed-on: https://skia-review.googlesource.com/c/174584
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-12-05 18:20:28 +00:00
Greg Daniel
45723ac931 Take into accout the GrBackendFormat when deciding if we can chain textures together.
Bug: skia:
Change-Id: I8c26bed1bb18318f96d248c227e3b33b190d2a05
Reviewed-on: https://skia-review.googlesource.com/c/173320
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-12-03 16:54:40 +00:00
Greg Daniel
7e000220c3 Reland "Add support for Ycbcr Conversion Samplers in vulkan."
This is a reland of 6cd74900da

Original change's description:
> Add support for Ycbcr Conversion Samplers in vulkan.
> 
> The only thing missing from this CL is that we need to bake the
> ycbcr conversion samplers into the VkPipeline when we create it. As that
> is a larger change, that will be broken up into a few follow on CLs.
> 
> Currently this only supports ycbcr conversion samplers when used with
> external textures.
> 
> Bug: skia:
> Change-Id: I23e95b19469093072589ebbbfb7926ab79dcdea9
> Reviewed-on: https://skia-review.googlesource.com/c/164602
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

Bug: skia:
Change-Id: I943398077775ef6396fbe5cb9196d23a29128669
Reviewed-on: https://skia-review.googlesource.com/c/173986
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-12-03 16:16:55 +00:00
Greg Daniel
f4bf973592 Revert "Add support for Ycbcr Conversion Samplers in vulkan."
This reverts commit 6cd74900da.

Reason for revert: breaking win vulkan bots

Original change's description:
> Add support for Ycbcr Conversion Samplers in vulkan.
> 
> The only thing missing from this CL is that we need to bake the
> ycbcr conversion samplers into the VkPipeline when we create it. As that
> is a larger change, that will be broken up into a few follow on CLs.
> 
> Currently this only supports ycbcr conversion samplers when used with
> external textures.
> 
> Bug: skia:
> Change-Id: I23e95b19469093072589ebbbfb7926ab79dcdea9
> Reviewed-on: https://skia-review.googlesource.com/c/164602
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ib56905821cbfd40cf30ec89269b551ce01605a1a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/173982
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-12-03 14:34:45 +00:00
Greg Daniel
6cd74900da Add support for Ycbcr Conversion Samplers in vulkan.
The only thing missing from this CL is that we need to bake the
ycbcr conversion samplers into the VkPipeline when we create it. As that
is a larger change, that will be broken up into a few follow on CLs.

Currently this only supports ycbcr conversion samplers when used with
external textures.

Bug: skia:
Change-Id: I23e95b19469093072589ebbbfb7926ab79dcdea9
Reviewed-on: https://skia-review.googlesource.com/c/164602
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-12-03 14:13:42 +00:00
Brian Salomon
2335644771 Fix occurrences of "-Wextra-semi-stmt"
Docs-Preview: https://skia.org/?cl=173761
Change-Id: Iefdb91cd28eabb4b01b7b42a4f300b0b4caf05d9
Reviewed-on: https://skia-review.googlesource.com/c/173761
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-11-30 23:23:09 +00:00
Greg Daniel
54bfb18dad Privately include our version of vulkan header file in all our src files.
This should allow clients to include Skia and their vulkan files in any
order. However, it does require that when clients are building their
files that include skia with vulkan, they must have vulkan/vulkan_core.h
on their include path somewhere.

Bug: skia:
Change-Id: I969db396c92127be7c8df754926d175f38b8aafa
Reviewed-on: https://skia-review.googlesource.com/c/172147
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-11-26 15:15:44 +00:00