Commit Graph

400 Commits

Author SHA1 Message Date
Brian Osman
aa1ab8905e Revert "Add GrExternalTextureData and SkCrossContextImageData"
This reverts commit 9ad1f92e2f.

Reason for revert: Breaking lots of bots

Original change's description:
> Add GrExternalTextureData and SkCrossContextImageData
> 
> GrExternalTextureData is an API for exporting the backend-specific
> information about a texture in a type-safe way, and without pointing
> into the GrTexture. The new detachBackendTexture API lets us release
> ownership of a texture to the client.
> 
> SkCrossContextImageData is the public API that lets clients upload
> textures on one thread/GrContext, then safely transfer ownership to
> another thread and GrContext for rendering.
> 
> Only GL is implemented/supported right now. Vulkan support requires
> that we add thread-safe memory pools, or otherwise transfer the
> actual memory block containing the texture to the new context.
> 
> BUG=skia:
> 
> Change-Id: I784a3a74be69807df038c7d192eaed002c7e45ca
> Reviewed-on: https://skia-review.googlesource.com/8529
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org,chinmaygarde@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: If27d1f4c3a169efb6533170f67a172664c0fe8ce
Reviewed-on: https://skia-review.googlesource.com/8955
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-02-24 17:28:03 +00:00
Brian Osman
9ad1f92e2f Add GrExternalTextureData and SkCrossContextImageData
GrExternalTextureData is an API for exporting the backend-specific
information about a texture in a type-safe way, and without pointing
into the GrTexture. The new detachBackendTexture API lets us release
ownership of a texture to the client.

SkCrossContextImageData is the public API that lets clients upload
textures on one thread/GrContext, then safely transfer ownership to
another thread and GrContext for rendering.

Only GL is implemented/supported right now. Vulkan support requires
that we add thread-safe memory pools, or otherwise transfer the
actual memory block containing the texture to the new context.

BUG=skia:

Change-Id: I784a3a74be69807df038c7d192eaed002c7e45ca
Reviewed-on: https://skia-review.googlesource.com/8529
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-02-24 16:09:33 +00:00
Brian Osman
46da1cc9f2 GrContext option to prevent GPU based YUV -> RGB
Rob and I spent a long time debugging why this wasn't working for
Flutter - doing the more complex operations on the loading thread
produces a blank texture when it's used later on the drawing thread.

Limiting ourselves to just creating and uploading RGBA data fixes
that. We need to debug what's going wrong, but in the meantime, this
lets Flutter use Skia APIs to manage GPU uploading and lifetime of
texture-backed images, while still doing those uploads on their IO
thread.

BUG=skia:

Change-Id: Ibf5c37f2439814544beab8c93c2a646f7a9e779d
Reviewed-on: https://skia-review.googlesource.com/8443
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-02-14 20:42:06 +00:00
Robert Phillips
40fd7c94c2 Push GrTextureProxy down to more effects
Change-Id: Ie3f32a88f25af082c25bc6daf3fe24e303e80f9e
Reviewed-on: https://skia-review.googlesource.com/7616
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-01-30 13:40:15 +00:00
Robert Phillips
757914d26b Switch GrConfigConversionEffect over to taking GrTextureProxies
Change-Id: Ic8be773e210e1ac05dcb9aad6c89dcd63e9e4ba2
Reviewed-on: https://skia-review.googlesource.com/7521
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-01-25 21:23:28 +00:00
Robert Phillips
77505da160 Remove GrTestTarget
Change-Id: I4d2e1aa54732ff75b44a197255035c0e04548219
Reviewed-on: https://skia-review.googlesource.com/7327
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-01-20 16:47:34 +00:00
Robert Phillips
c37e61455d Rename GrContext::getFontAtlas to getFontAtlas_ForTesting
A trivial change but it does better indicate the nature of the method

Change-Id: I44a0e77dba28df892f4200496d78797ed5fd37df
Reviewed-on: https://skia-review.googlesource.com/7331
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-01-20 15:54:54 +00:00
Brian Osman
b62ea2240f Change GPU read/write pixels API to support color space conversion
GrContext still doesn't convert, but it has the source and destination
color spaces, and call sites are supplying appropriate values where it
makes sense.

BUG=skia:

Change-Id: Ia88733125b8090776cfc9b0dc8030cce365b0b8b
Reviewed-on: https://skia-review.googlesource.com/6400
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-12-22 16:44:56 +00:00
Robert Phillips
33667da26d Restore getDevice_just_for_deprecated_compatibility_testing
Change-Id: I98e73a5f72ef8c8efb1a4f382a5359d21bb5edc8
Reviewed-on: https://skia-review.googlesource.com/6325
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-20 16:38:48 +00:00
Robert Phillips
22f4a1fd48 Remove getDevice_just_for_deprecated_compatibility_test()
BUG=skia:6067

Change-Id: I646e75f43bc77ea884b7fad7281bf0b684996bb9
Reviewed-on: https://skia-review.googlesource.com/6299
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-20 14:39:45 +00:00
Brian Salomon
2ee084e730 Rename GrBatchAtlas -> GrDrawOpAtlas.
Change-Id: I776f37e42dcab8b16535c48df9c405b1f211f6c9
Reviewed-on: https://skia-review.googlesource.com/6165
Commit-Queue: Brian Salomon <brian@thesalomons.net>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-17 00:35:39 +00:00
Brian Salomon
f856fd1ccd Rename GrBatchFontCache->GrAtlasGlyphCache
Change-Id: Ie21e18b631daa24e70df630b9f910213f62bdbdf
Reviewed-on: https://skia-review.googlesource.com/6164
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-16 19:48:35 +00:00
Robert Phillips
e2f7d1899d Add a deferred copy surface (take 3)
This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext).

There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added.

This is a reland of https://skia-review.googlesource.com/c/5773/ (Add a deferred copy surface)

Change-Id: Ib8fd96d0569274ef781366eb900ed8ee839ae9bd
Reviewed-on: https://skia-review.googlesource.com/6109
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-15 15:07:39 +00:00
Robert Phillips
65115a1b1a Remove mutex guards from GrContext::readSurfacePixels
Change-Id: Ief4f0faae7abeb996bdfc993e368e64755da15a7
Reviewed-on: https://skia-review.googlesource.com/5929
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-14 13:04:01 +00:00
Robert Phillips
d316e77c1e Revert "Add a deferred copy surface (take 2)"
This reverts commit 398487a850.

Reason for revert: See if this is causing the roll failure

Original change's description:
> Add a deferred copy surface (take 2)
> 
> This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext).
> 
> There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added.
> 
> This is a reland of https://skia-review.googlesource.com/c/5773/ (Add a deferred copy surface)
> 
> Change-Id: Ide560f569aede5e622420dc2f30eef76357d69f4
> Reviewed-on: https://skia-review.googlesource.com/5939
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I1ef40f0d5fb0bca62031f94f10eb18acd753e913
Reviewed-on: https://skia-review.googlesource.com/6024
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-12-14 12:05:06 +00:00
Robert Phillips
398487a850 Add a deferred copy surface (take 2)
This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext).

There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added.

This is a reland of https://skia-review.googlesource.com/c/5773/ (Add a deferred copy surface)

Change-Id: Ide560f569aede5e622420dc2f30eef76357d69f4
Reviewed-on: https://skia-review.googlesource.com/5939
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-13 22:01:58 +00:00
Robert Phillips
293d696fcf Revert "Add a deferred copy surface"
This reverts commit 4431de6af9.

Reason for revert: ANGLE errors (at the very least)

Original change's description:
> Add a deferred copy surface
> 
> This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext).
> 
> There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added.
> 
> Change-Id: Iab1867668d8146a766201158a251b9174438ee2b
> Reviewed-on: https://skia-review.googlesource.com/5773
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I61408d9e306b9b1ab32f93ab086e95184e12857f
Reviewed-on: https://skia-review.googlesource.com/5938
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-12-13 18:48:20 +00:00
Robert Phillips
4431de6af9 Add a deferred copy surface
This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext).

There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added.

Change-Id: Iab1867668d8146a766201158a251b9174438ee2b
Reviewed-on: https://skia-review.googlesource.com/5773
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-13 17:57:13 +00:00
robertphillips
d728f0c1a9 Defer more renderTargetContexts in the GPU image filter paths - take 2
This is a reland of https://skia-review.googlesource.com/c/4767/ (Defer more renderTargetContexts in the GPU image filter paths).
The addition of guards on instantiation && accessRenderTarget failure should prevent a reoccurence of this Nexus7 failures.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2514543002

TBR=bsalomon@google.com

Review-Url: https://codereview.chromium.org/2514543002
2016-11-21 11:05:03 -08:00
Brian Salomon
514baff8be Rename GrTextureParams to GrSamplerParams
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4965

Change-Id: I7d52e81c670e92ca96117284f44b274ce3cc3671
Reviewed-on: https://skia-review.googlesource.com/4965
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-11-17 21:13:18 +00:00
Robert Phillips
4e344c8b93 Revert "Defer more renderTargetContexts in the GPU image filter paths"
This reverts commit fd01ce05ef.

Reason for revert: see if this is the cause of the Nexus7 assertion failure

Original change's description:
> Defer more renderTargetContexts in the GPU image filter paths
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4767
> 
> Change-Id: I4c1f27247ef340a49d1ac96761810e77e6047ca2
> Reviewed-on: https://skia-review.googlesource.com/4767
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I158f96ec1252481345fc5dca15086ffd4b47cb95
Reviewed-on: https://skia-review.googlesource.com/4875
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-11-15 22:17:40 +00:00
Robert Phillips
fd01ce05ef Defer more renderTargetContexts in the GPU image filter paths
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4767

Change-Id: I4c1f27247ef340a49d1ac96761810e77e6047ca2
Reviewed-on: https://skia-review.googlesource.com/4767
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-11-15 15:05:37 +00:00
Brian Salomon
aeac5d8e90 Change comments to refer to "render target context" rather than "draw context"
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4180

Change-Id: I553043ed576d0654faa68ed2e9e9978e4fc6476c
Reviewed-on: https://skia-review.googlesource.com/4180
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-10-29 04:32:35 +00:00
Robert Phillips
c7635fa374 Make GrDrawContext be GrRenderTargetProxy-backed
This is split out of https://codereview.chromium.org/2215323003/ (Start using RenderTargetProxy (omnibus))

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3841

CQ_INCLUDE_TRYBOTS=master.client.skia.android:Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-GN_Android-Trybot

Change-Id: I1a47f19ed1ac0c249e6ccac8db74095d7f456db4
Reviewed-on: https://skia-review.googlesource.com/3841
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2016-10-28 18:35:06 +00:00
Brian Osman
1105224f97 Rename GrDrawContext to GrRenderTargetContext
This is in preparation for GrTextureContext and GrSurfaceContext

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4030

Change-Id: Ie58c93052e68f3f1f5fe8d15d63760de274a6fbd
Reviewed-on: https://skia-review.googlesource.com/4030
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-10-27 19:14:09 +00:00
bungeman
6bd5284415 Remove SkAutoTUnref and SkAutoTDelete from public includes.
This also makes the required changed to src, tests, and tools. The few
public APIs modified by this change appear to be unused outside of Skia.

Removing these from the public API makes it easier to ensure users are
no longer using them.

This also updates GrGpu::wrapBackendXXX and the
::onWrapBackendXXX methods to clarify ownership.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2448593002

Review-Url: https://codereview.chromium.org/2448593002
2016-10-27 09:30:08 -07:00
bsalomon
b77a907c2f Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache.
Consolidates all flush actions into GrDrawingManager and makes GrContext::flush a passthrough.

Removes the unused and untested discard flush variation.

Replaces the indirect overbudget callback mechanism of GrResourceCache with a flag set by resource cache when it wants to flush that is checked after each draw by GrDrawContext.

Modifies GrResourceCache::notifyFlushOccurred() to take a param indicating whether it triggered the
flush that just occurred.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2307053002

Committed: https://skia.googlesource.com/skia/+/1dbb207babecdae8f1f74ed9d9900c73064df744
Review-Url: https://codereview.chromium.org/2307053002
2016-09-07 10:02:04 -07:00
bsalomon
5eb41fdf94 Revert of Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache. (patchset #4 id:60001 of https://codereview.chromium.org/2307053002/ )
Reason for revert:
Causing assertions on bots

Original issue's description:
> Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache.
>
> Consolidates all flush actions into GrDrawingManager and makes GrContext::flush a passthrough.
>
> Removes the unused and untested discard flush variation.
>
> Replaces the indirect overbudget callback mechanism of GrResourceCache with a flag set by resource cache when it wants to flush that is checked after each draw by GrDrawContext.
>
> Modifies GrResourceCache::notifyFlushOccurred() to take a param indicating whether it triggered the
> flush that just occurred.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2307053002
>
> Committed: https://skia.googlesource.com/skia/+/1dbb207babecdae8f1f74ed9d9900c73064df744

TBR=robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2312123003
2016-09-06 13:49:32 -07:00
bsalomon
1dbb207bab Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache.
Consolidates all flush actions into GrDrawingManager and makes GrContext::flush a passthrough.

Removes the unused and untested discard flush variation.

Replaces the indirect overbudget callback mechanism of GrResourceCache with a flag set by resource cache when it wants to flush that is checked after each draw by GrDrawContext.

Modifies GrResourceCache::notifyFlushOccurred() to take a param indicating whether it triggered the
flush that just occurred.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2307053002

Review-Url: https://codereview.chromium.org/2307053002
2016-09-06 12:38:00 -07:00
robertphillips
48fde9c412 Add a makeDrawContextWithFallback that handles config fallback
This fixes a bug in find_or_create_rrect_blur_mask where an A8-based drawContext was desired but creation was failing b.c. A8 wasn't renderable.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2296193005

Review-Url: https://codereview.chromium.org/2296193005
2016-09-06 05:20:20 -07:00
csmartdalton
bde96c6263 Move clip mask generation into GrReducedClip
This is a temporary solution to facilitate window rectangles and make
clip mask generation more accessible for testing. The eventual goal is
to simplify clips and merge GrReducedClip into GrClipStackClip.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2263343002

Review-Url: https://codereview.chromium.org/2263343002
2016-08-31 12:54:46 -07:00
ajuma
95243ebb68 Make GrTextureStripAtlas flush pending IO on newly acquired texture
GrTextureStripAtlas uses its own lock counts to protect against
overwriting its own earlier writes, but that doesn't protect against
IO that was pending when a texture was first acquired.

BUG=chromium:637678
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2262233002

Review-Url: https://codereview.chromium.org/2262233002
2016-08-24 08:19:03 -07:00
csmartdalton
c6f411e72b Merge GrClipMaskManager into GrClipStackClip
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2196393007

Review-Url: https://codereview.chromium.org/2196393007
2016-08-05 22:32:12 -07:00
robertphillips
4fd74aec9f Move GrContext::makeDrawContext to new GrContextPriv object
We don't want external clients to be able to call the wrapping makeDrawContext. The "creating" makeDrawContext needs to be public for external image filters.

The 3 specialized drawContext creators on GrContextPriv (to wrap backend objects) are also to be kept from public use and will be used to remove SkSurface::MakeRenderTargetDirect.

Split out of: https://codereview.chromium.org/2176333002/ (Remove SkSurface::MakeRenderTargetDirect)

TBR=bsalomon@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2211473002

Review-Url: https://codereview.chromium.org/2211473002
2016-08-03 14:26:53 -07:00
robertphillips
1e8761809d Remove GrContext::applyGamma
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2191323002

Review-Url: https://codereview.chromium.org/2191323002
2016-07-29 08:28:25 -07:00
robertphillips
6738c70242 Rename GrContext's newDrawContext & drawContext to makeDrawContext
These both return sk_sp.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2186073002

Review-Url: https://codereview.chromium.org/2186073002
2016-07-27 12:13:51 -07:00
brianosman
dfe4f2e4fe Add SkColorSpace to GrDrawContext
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2164363002

Review-Url: https://codereview.chromium.org/2164363002
2016-07-21 13:28:36 -07:00
robertphillips
dda54455a2 Remove GrLayerHoister
This relies on https://codereview.chromium.org/1944013002/ (Add legacy flag to allow Skia to remove Ganesh layer hoister) landing first so as to not break the DEPS roll.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1950523002

Review-Url: https://codereview.chromium.org/1950523002
2016-07-13 13:27:16 -07:00
bungeman
06ca8ec87c sk_sp for Ganesh.
Convert use of GrFragmentProcessor, GrGeometryProcessor, and
GrXPFactory to sk_sp. This clarifies ownership and should
reduce reference count churn by moving ownership.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041113004

Review-Url: https://codereview.chromium.org/2041113004
2016-06-09 08:01:03 -07:00
robertphillips
87f15c8ff1 Retract GrRenderTarget from GrTestTarget
Split out of: https://codereview.chromium.org/1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder)

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=2004433002

Review-Url: https://codereview.chromium.org/2004433002
2016-05-20 11:14:33 -07:00
robertphillips
ca6eafc0f7 (Mostly) Retract GrRenderTarget from SkGpuDevice
This gets us most of the way to having SkGpuDevice exclusively use a GrDrawContext instead of a GrRenderTarget. There are a few other refactorings (e.g., rm need for fLegacyBitmap and accessRenderTarget) before the GrRenderTarget can be completely removed.

Has calved off:
https://codereview.chromium.org/1925313002/ (Tighten up SkSpecialSurface factory functions)
https://codereview.chromium.org/1925803004/ (Add sk_sp to SkSurface_Gpu and SkGpuDevice)
https://codereview.chromium.org/1956473002/ (Retract GrRenderTarget a bit within SkGpuDevice)
https://codereview.chromium.org/1979913002/ (Rename GrDrawingMgr::abandon to wasAbandoned & add a matching entry point to GrDrawingContext)
https://codereview.chromium.org/1982583002/ (Add isUnifiedMultisampled entry point to GrDrawContext)

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1930013002

Review-Url: https://codereview.chromium.org/1930013002
2016-05-17 09:57:46 -07:00
robertphillips
ebf30e8415 Switch GrTextureToYUVPlanes over to newDrawContext calls
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1970743002

Review-Url: https://codereview.chromium.org/1970743002
2016-05-11 08:34:39 -07:00
bsalomon
6663acff01 Replace GrStrokeInfo with GrStyle.
A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002

Committed: https://skia.googlesource.com/skia/+/33595bdf4b64a745f6340338d307e806e96c587f

Review-Url: https://codereview.chromium.org/1957363002
2016-05-10 09:14:17 -07:00
bsalomon
85d9667f59 Revert of Replace GrStrokeInfo with GrStyle. (patchset #4 id:160001 of https://codereview.chromium.org/1957363002/ )
Reason for revert:
Breaking some bots

Original issue's description:
> Replace GrStrokeInfo with GrStyle.
>
> A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002
>
> Committed: https://skia.googlesource.com/skia/+/33595bdf4b64a745f6340338d307e806e96c587f

TBR=egdaniel@google.com,robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/1967513002
2016-05-10 06:19:21 -07:00
bsalomon
33595bdf4b Replace GrStrokeInfo with GrStyle.
A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002

Review-Url: https://codereview.chromium.org/1957363002
2016-05-10 05:57:27 -07:00
robertphillips
a8966a8a34 Reland of Simplify SkGpuBlurUtils::GaussianBlur method (patchset #1 id:1 of https://codereview.chromium.org/1956023002/ )
Reason for revert:
May not be as bad as was thought

Original issue's description:
> Revert of Simplify SkGpuBlurUtils::GaussianBlur method (patchset #2 id:20001 of https://codereview.chromium.org/1958603002/ )
>
> Reason for revert:
> Looks like it's causing some issues with the bleed_image GM.
>
> Original issue's description:
> > Simplify SkGpuBlurUtils::GaussianBlur method
> >
> > No one was using the canClobberSrc capability and moving the direct filtering case forward makes the rest of the logic simpler.
> >
> > Split out of: https://codereview.chromium.org/1959493002/ (Retract GrRenderTarget from SkGpuBlurUtils)
> >
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1958603002
> >
> > Committed: https://skia.googlesource.com/skia/+/56a85e69a8d034e0fdee00e8207cda0a9da06fee
>
> TBR=bsalomon@google.com,robertphillips@google.com
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/67a58dcd4a1e79e5832161ae953526d27893aa61

TBR=bsalomon@google.com,jvanverth@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.

Review-Url: https://codereview.chromium.org/1961953002
2016-05-09 06:45:37 -07:00
jvanverth
67a58dcd4a Revert of Simplify SkGpuBlurUtils::GaussianBlur method (patchset #2 id:20001 of https://codereview.chromium.org/1958603002/ )
Reason for revert:
Looks like it's causing some issues with the bleed_image GM.

Original issue's description:
> Simplify SkGpuBlurUtils::GaussianBlur method
>
> No one was using the canClobberSrc capability and moving the direct filtering case forward makes the rest of the logic simpler.
>
> Split out of: https://codereview.chromium.org/1959493002/ (Retract GrRenderTarget from SkGpuBlurUtils)
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1958603002
>
> Committed: https://skia.googlesource.com/skia/+/56a85e69a8d034e0fdee00e8207cda0a9da06fee

TBR=bsalomon@google.com,robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/1956023002
2016-05-06 13:05:09 -07:00
robertphillips
56a85e69a8 Simplify SkGpuBlurUtils::GaussianBlur method
No one was using the canClobberSrc capability and moving the direct filtering case forward makes the rest of the logic simpler.

Split out of: https://codereview.chromium.org/1959493002/ (Retract GrRenderTarget from SkGpuBlurUtils)

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1958603002

Review-Url: https://codereview.chromium.org/1958603002
2016-05-06 07:17:49 -07:00
brianosman
2d1ee7936e Added --deepColor option to SampleApp, triggers creation of a ten-bit/channel
buffer. (Only on Windows at the moment). Uses new effect to do the final
gamma adjustment

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1919993002

Review-Url: https://codereview.chromium.org/1919993002
2016-05-05 12:24:31 -07:00
robertphillips
76948d4faa Add Gr*Proxy classes
This isn't wired in anywhere yet.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1937553002

Committed: https://skia.googlesource.com/skia/+/de5bf0cfeca908b81a28cc50065f7bc2da3d2fd1

Committed: https://skia.googlesource.com/skia/+/92605b35efa0155c44d24bd8415b4cc1db8831db

Review-Url: https://codereview.chromium.org/1937553002
2016-05-04 12:47:41 -07:00