aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2018-07-03 16:38:32 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-03 16:38:45 +0000
commit34aa059c1502d67c9a5f4db449667a8709b69fb9 (patch)
tree0fc7a5e33d505ae119b56cc58b4fd55f96654073 /include/gpu
parentb6307340e8a6a9d3a7517def7f5eaaadffd07d14 (diff)
Revert "Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors."
This reverts commit ff2181e62e79ffd2ce628fc8c05b5457d4f54163. Reason for revert: suspect it's behind Chrome roll failure Original change's description: > Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors. > > Bug: skia: > Change-Id: I1466668e3502cd1e6e1f6aed4105e0f626d293dd > Reviewed-on: https://skia-review.googlesource.com/138987 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I4cba44858aafffbadc45e18349b93c741d7cfc66 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/139220 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'include/gpu')
-rw-r--r--include/gpu/GrBackendSurface.h43
1 files changed, 30 insertions, 13 deletions
diff --git a/include/gpu/GrBackendSurface.h b/include/gpu/GrBackendSurface.h
index dc13795435..7f05bb50ee 100644
--- a/include/gpu/GrBackendSurface.h
+++ b/include/gpu/GrBackendSurface.h
@@ -128,6 +128,23 @@ public:
// Creates an invalid backend texture.
GrBackendTexture() : fIsValid(false) {}
+#if GR_TEST_UTILS
+ // GrGLTextureInfo::fFormat is ignored
+ // Deprecated: Should use version that does not take a GrPixelConfig instead
+ GrBackendTexture(int width,
+ int height,
+ GrPixelConfig config,
+ const GrGLTextureInfo& glInfo);
+
+ // GrGLTextureInfo::fFormat is ignored
+ // Deprecated: Should use version that does not take a GrPixelConfig instead
+ GrBackendTexture(int width,
+ int height,
+ GrPixelConfig config,
+ GrMipMapped,
+ const GrGLTextureInfo& glInfo);
+#endif
+
// The GrGLTextureInfo must have a valid fFormat.
GrBackendTexture(int width,
int height,
@@ -192,12 +209,7 @@ public:
bool isValid() const { return fIsValid; }
#if GR_TEST_UTILS
- // We can remove the pixelConfig getter and setter once we remove the GrPixelConfig from the
- // GrBackendTexture and plumb the GrPixelconfig manually throughout our code (or remove all use
- // of GrPixelConfig in general).
- GrPixelConfig pixelConfig() const { return fConfig; }
- void setPixelConfig(GrPixelConfig config) { fConfig = config; }
-
+ GrPixelConfig testingOnly_getPixelConfig() const;
static bool TestingOnly_Equals(const GrBackendTexture& , const GrBackendTexture&);
#endif
@@ -206,7 +218,6 @@ private:
friend class SkImage;
friend class SkImage_Gpu;
friend class SkSurface;
- friend class GrAHardwareBufferImageGenerator;
friend class GrBackendTextureImageGenerator;
friend class GrProxyProvider;
friend class GrGpu;
@@ -255,6 +266,17 @@ public:
// Creates an invalid backend texture.
GrBackendRenderTarget() : fIsValid(false) {}
+#if GR_TEST_UTILS
+ // GrGLTextureInfo::fFormat is ignored
+ // Deprecated: Should use version that does not take a GrPixelConfig instead
+ GrBackendRenderTarget(int width,
+ int height,
+ int sampleCnt,
+ int stencilBits,
+ GrPixelConfig config,
+ const GrGLFramebufferInfo& glInfo);
+#endif
+
// The GrGLTextureInfo must have a valid fFormat.
GrBackendRenderTarget(int width,
int height,
@@ -326,12 +348,7 @@ public:
#if GR_TEST_UTILS
- // We can remove the pixelConfig getter and setter once we remove the pixel config from the
- // GrBackendRenderTarget and plumb the pixel config manually throughout our code (or remove all
- // use of GrPixelConfig in general).
- GrPixelConfig pixelConfig() const { return fConfig; }
- void setPixelConfig(GrPixelConfig config) { fConfig = config; }
-
+ GrPixelConfig testingOnly_getPixelConfig() const;
static bool TestingOnly_Equals(const GrBackendRenderTarget&, const GrBackendRenderTarget&);
#endif