aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-05-23 19:02:57 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-23 19:03:01 +0000
commita9e795eab5f59a52d96b8fdc39351452835f5eb9 (patch)
tree485e9f49fdb82f416014eea8d7fb397938466fd9 /include
parente8fa42768106bd7f4ca7bf5c72dde442a29d43cf (diff)
Revert "Add a flag to GrSurfaceFlags that requires the texture to be cleared upon creation. "
This reverts commit 45e5068a6d10f4e4fd4658824310f8871f02ccf7. Reason for revert: :'( Original change's description: > Add a flag to GrSurfaceFlags that requires the texture to be cleared upon creation. > > Bug: chromium:656320 > > Change-Id: I940bfa24540516ab83a2ed52f761b96eb6ad19f1 > Reviewed-on: https://skia-review.googlesource.com/17391 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Bug: chromium:656320 Change-Id: I8a4f71537e45f3c4cf37b10b2dc8ee38fe6959ba Reviewed-on: https://skia-review.googlesource.com/17765 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrTypes.h11
-rw-r--r--include/gpu/gl/GrGLFunctions.h2
-rw-r--r--include/gpu/gl/GrGLInterface.h2
-rw-r--r--include/private/GrSurfaceProxy.h4
4 files changed, 4 insertions, 15 deletions
diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h
index 51f24b494e..e9630270f6 100644
--- a/include/gpu/GrTypes.h
+++ b/include/gpu/GrTypes.h
@@ -443,7 +443,6 @@ static inline bool GrPixelConfigIsOpaque(GrPixelConfig config) {
switch (config) {
case kRGB_565_GrPixelConfig:
case kGray_8_GrPixelConfig:
- case kRG_float_GrPixelConfig:
return true;
case kAlpha_8_GrPixelConfig:
case kRGBA_4444_GrPixelConfig:
@@ -455,6 +454,7 @@ static inline bool GrPixelConfigIsOpaque(GrPixelConfig config) {
case kRGBA_8888_sint_GrPixelConfig:
case kRGBA_half_GrPixelConfig:
case kRGBA_float_GrPixelConfig:
+ case kRG_float_GrPixelConfig:
case kUnknown_GrPixelConfig:
return false;
}
@@ -516,17 +516,12 @@ static inline bool GrPixelConfigIsSint(GrPixelConfig config) {
* Optional bitfield flags that can be set on GrSurfaceDesc (below).
*/
enum GrSurfaceFlags {
- kNone_GrSurfaceFlags = 0x0,
+ kNone_GrSurfaceFlags = 0x0,
/**
* Creates a texture that can be rendered to as a GrRenderTarget. Use
* GrTexture::asRenderTarget() to access.
*/
- kRenderTarget_GrSurfaceFlag = 0x1,
- /**
- * Clears to zero on creation. It will cause creation failure if initial data is supplied to the
- * texture. This only affects the base level if the texture is created with MIP levels.
- */
- kPerformInitialClear_GrSurfaceFlag = 0x2
+ kRenderTarget_GrSurfaceFlag = 0x1,
};
GR_MAKE_BITFIELD_OPS(GrSurfaceFlags)
diff --git a/include/gpu/gl/GrGLFunctions.h b/include/gpu/gl/GrGLFunctions.h
index 930a0c1aad..9cb7ddc261 100644
--- a/include/gpu/gl/GrGLFunctions.h
+++ b/include/gpu/gl/GrGLFunctions.h
@@ -40,8 +40,6 @@ typedef GrGLenum (GR_GL_FUNCTION_TYPE* GrGLCheckFramebufferStatusProc)(GrGLenum
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLClearProc)(GrGLbitfield mask);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLClearColorProc)(GrGLclampf red, GrGLclampf green, GrGLclampf blue, GrGLclampf alpha);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLClearStencilProc)(GrGLint s);
-typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLClearTexImageProc)(GrGLuint texture, GrGLint level, GrGLenum format, GrGLenum type,const GrGLvoid * data);
-typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLClearTexSubImageProc)(GrGLuint texture, GrGLint level, GrGLint xoffset, GrGLint yoffset, GrGLint zoffset, GrGLsizei width, GrGLsizei height, GrGLsizei depth, GrGLenum format, GrGLenum type,const GrGLvoid * data);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLColorMaskProc)(GrGLboolean red, GrGLboolean green, GrGLboolean blue, GrGLboolean alpha);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLCompileShaderProc)(GrGLuint shader);
typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLCompressedTexImage2DProc)(GrGLenum target, GrGLint level, GrGLenum internalformat, GrGLsizei width, GrGLsizei height, GrGLint border, GrGLsizei imageSize, const GrGLvoid* data);
diff --git a/include/gpu/gl/GrGLInterface.h b/include/gpu/gl/GrGLInterface.h
index e5479eb466..c84eca28c6 100644
--- a/include/gpu/gl/GrGLInterface.h
+++ b/include/gpu/gl/GrGLInterface.h
@@ -125,8 +125,6 @@ public:
GrGLFunction<GrGLClearProc> fClear;
GrGLFunction<GrGLClearColorProc> fClearColor;
GrGLFunction<GrGLClearStencilProc> fClearStencil;
- GrGLFunction<GrGLClearTexImageProc> fClearTexImage;
- GrGLFunction<GrGLClearTexSubImageProc> fClearTexSubImage;
GrGLFunction<GrGLColorMaskProc> fColorMask;
GrGLFunction<GrGLCompileShaderProc> fCompileShader;
GrGLFunction<GrGLCompressedTexImage2DProc> fCompressedTexImage2D;
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h
index 4ae041d4dd..1b7950c510 100644
--- a/include/private/GrSurfaceProxy.h
+++ b/include/private/GrSurfaceProxy.h
@@ -323,7 +323,6 @@ protected:
, fFit(fit)
, fBudgeted(budgeted)
, fFlags(flags)
- , fNeedsClear(SkToBool(desc.fFlags & kPerformInitialClear_GrSurfaceFlag))
, fGpuMemorySize(kInvalidGpuMemorySize)
, fLastOpList(nullptr) {
// Note: this ctor pulls a new uniqueID from the same pool at the GrGpuResources
@@ -360,6 +359,7 @@ protected:
// mutable bc of SkSurface/SkImage wishy-washiness
const uint32_t fFlags;
+
const UniqueID fUniqueID; // set from the backing resource for wrapped resources
static const size_t kInvalidGpuMemorySize = ~static_cast<size_t>(0);
@@ -368,8 +368,6 @@ protected:
private:
virtual size_t onUninstantiatedGpuMemorySize() const = 0;
- bool fNeedsClear;
-
// This entry is lazily evaluated so, when the proxy wraps a resource, the resource
// will be called but, when the proxy is deferred, it will compute the answer itself.
// If the proxy computes its own answer that answer is checked (in debug mode) in