aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-05-17 14:27:58 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-18 14:38:03 +0000
commit081e0e6a32244a7945ddd40c2003fd312673c586 (patch)
tree4e21a3f2e8a7768cac66c38200f7ad3ad8a50623 /include/private
parentc96da1e51e1ca72d54dda49f32891bd41530ad31 (diff)
Move MIP color mode from GrSurfaceProxy to GrTextureProxy
Change-Id: I76bc7f551ea4052fc611cf01e0ce81102c9c3395 Reviewed-on: https://skia-review.googlesource.com/17263 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include/private')
-rw-r--r--include/private/GrSurfaceProxy.h6
-rw-r--r--include/private/GrTextureProxy.h3
2 files changed, 5 insertions, 4 deletions
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h
index bf668fcb2d..1b7950c510 100644
--- a/include/private/GrSurfaceProxy.h
+++ b/include/private/GrSurfaceProxy.h
@@ -323,8 +323,6 @@ protected:
, fFit(fit)
, fBudgeted(budgeted)
, fFlags(flags)
- // fMipColorMode is only valid for texturable proxies
- , fMipColorMode(SkDestinationSurfaceColorMode::kLegacy)
, fGpuMemorySize(kInvalidGpuMemorySize)
, fLastOpList(nullptr) {
// Note: this ctor pulls a new uniqueID from the same pool at the GrGpuResources
@@ -347,7 +345,8 @@ protected:
}
GrSurface* instantiateImpl(GrResourceProvider* resourceProvider, int sampleCnt,
- GrSurfaceFlags flags, bool isMipMapped);
+ GrSurfaceFlags flags, bool isMipMapped,
+ SkDestinationSurfaceColorMode mipColorMode);
// For wrapped resources, 'fConfig', 'fWidth', 'fHeight', and 'fOrigin; will always be filled in
// from the wrapped resource.
@@ -360,7 +359,6 @@ protected:
// mutable bc of SkSurface/SkImage wishy-washiness
const uint32_t fFlags;
- SkDestinationSurfaceColorMode fMipColorMode;
const UniqueID fUniqueID; // set from the backing resource for wrapped resources
diff --git a/include/private/GrTextureProxy.h b/include/private/GrTextureProxy.h
index 342e920682..d40b2e173e 100644
--- a/include/private/GrTextureProxy.h
+++ b/include/private/GrTextureProxy.h
@@ -53,8 +53,11 @@ protected:
// Wrapped version
GrTextureProxy(sk_sp<GrSurface>);
+ SkDestinationSurfaceColorMode mipColorMode() const { return fMipColorMode; }
+
private:
bool fIsMipMapped;
+ SkDestinationSurfaceColorMode fMipColorMode;
size_t onUninstantiatedGpuMemorySize() const override;