aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Leon Scroggins <scroggo@google.com>2016-11-07 21:26:31 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-07 21:26:46 +0000
commit7d7d7d19462b75f5470492dc4820a02c1eba4af2 (patch)
tree5afc268cac425ef6e5b07c07af0293864e7ac2d7 /include
parent6749af40739fab375d87951c5b0fb51a195e1f8c (diff)
Revert "Add GrRenderTargetContext instantiate & asTextureProxy"
This reverts commit 9113edfff89e657dabc0ba095c54f7720550196c. Reason for revert: Looks to be causing EXCEPTION_ACCESS_VIOLATION: https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win-MSVC-NUC-GPU-IntelIris6100-x86_64-Debug/builds/121/steps/test_skia%20on%20Windows/logs/stdio https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win-MSVC-GCE-CPU-AVX2-x86-Debug/builds/2384/steps/test_skia%20on%20Windows-2008ServerR2-SP1/logs/stdio https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win-MSVC-ShuttleC-GPU-iHD530-x86_64-Debug/builds/785/steps/test_skia%20on%20Windows/logs/stdio Original change's description: > Add GrRenderTargetContext instantiate & asTextureProxy > > This CL also centralizes the instantiation code in GrSurfaceProxy and adds a test. > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4494 > > Change-Id: I0081d9a216dc0af293179f23bcb88acf6a822324 > Reviewed-on: https://skia-review.googlesource.com/4494 > 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: I225ce7867ebd445067e5ea55ebbfd587f7fe782a Reviewed-on: https://skia-review.googlesource.com/4528 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrRenderTargetContext.h10
-rw-r--r--include/private/GrRenderTargetProxy.h1
-rw-r--r--include/private/GrSurfaceProxy.h5
-rw-r--r--include/private/GrTextureProxy.h1
4 files changed, 4 insertions, 13 deletions
diff --git a/include/gpu/GrRenderTargetContext.h b/include/gpu/GrRenderTargetContext.h
index 95d8c9d463..f728ef15b2 100644
--- a/include/gpu/GrRenderTargetContext.h
+++ b/include/gpu/GrRenderTargetContext.h
@@ -33,7 +33,6 @@ class GrRenderTarget;
class GrRenderTargetOpList;
class GrStyle;
class GrSurface;
-class GrTextureProxy;
struct GrUserStencilSettings;
class SkDrawFilter;
struct SkIPoint;
@@ -343,20 +342,17 @@ public:
bool wasAbandoned() const;
- GrRenderTarget* instantiate();
-
GrRenderTarget* accessRenderTarget() {
// TODO: usage of this entry point needs to be reduced and potentially eliminated
// since it ends the deferral of the GrRenderTarget's allocation
return fRenderTargetProxy->instantiate(fContext->textureProvider());
}
- GrTextureProxy* asDeferredTexture();
-
sk_sp<GrTexture> asTexture() {
// TODO: usage of this entry point needs to be reduced and potentially eliminated
// since it ends the deferral of the GrRenderTarget's allocation
- // It's usage should migrate to asDeferredTexture
+ // It's usage should migrate to the soon-to-be-added asDeferredTexture which
+ // returns a GrTextureProxy
return sk_ref_sp(this->accessRenderTarget()->asTexture());
}
@@ -366,8 +362,6 @@ public:
GrAuditTrail* auditTrail() { return fAuditTrail; }
- bool isWrapped_ForTesting() const;
-
protected:
GrRenderTargetContext(GrContext*, GrDrawingManager*, sk_sp<GrRenderTargetProxy>,
sk_sp<SkColorSpace>, const SkSurfaceProps* surfaceProps, GrAuditTrail*,
diff --git a/include/private/GrRenderTargetProxy.h b/include/private/GrRenderTargetProxy.h
index 267d7549e3..3bad9df9e4 100644
--- a/include/private/GrRenderTargetProxy.h
+++ b/include/private/GrRenderTargetProxy.h
@@ -27,6 +27,7 @@ public:
SkBackingFit, SkBudgeted);
static sk_sp<GrRenderTargetProxy> Make(sk_sp<GrRenderTarget>);
+ // TODO: add asTextureProxy variants
GrRenderTargetProxy* asRenderTargetProxy() override { return this; }
const GrRenderTargetProxy* asRenderTargetProxy() const override { return this; }
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h
index 539aaf65aa..e748853cfd 100644
--- a/include/private/GrSurfaceProxy.h
+++ b/include/private/GrSurfaceProxy.h
@@ -13,7 +13,6 @@
#include "SkRect.h"
class GrOpList;
-class GrTextureProvider;
class GrTextureProxy;
class GrRenderTargetProxy;
@@ -128,8 +127,6 @@ public:
return fGpuMemorySize;
}
- bool isWrapped_ForTesting() const;
-
protected:
// Deferred version
GrSurfaceProxy(const GrSurfaceDesc& desc, SkBackingFit fit, SkBudgeted budgeted)
@@ -146,8 +143,6 @@ protected:
virtual ~GrSurfaceProxy();
- GrSurface* instantiate(GrTextureProvider* texProvider);
-
// For wrapped resources, 'fDesc' will always be filled in from the wrapped resource.
const GrSurfaceDesc fDesc;
const SkBackingFit fFit; // always exact for wrapped resources
diff --git a/include/private/GrTextureProxy.h b/include/private/GrTextureProxy.h
index 75f09de800..e68ef8896a 100644
--- a/include/private/GrTextureProxy.h
+++ b/include/private/GrTextureProxy.h
@@ -24,6 +24,7 @@ public:
const void* srcData = nullptr, size_t rowBytes = 0);
static sk_sp<GrTextureProxy> Make(sk_sp<GrTexture>);
+ // TODO: add asRenderTargetProxy variants
GrTextureProxy* asTextureProxy() override { return this; }
const GrTextureProxy* asTextureProxy() const override { return this; }