aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextureRenderTargetProxy.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-02-13 15:34:14 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-14 14:07:47 +0000
commit8242c5c199f5d04e4209222b265f9e27f7c55fa7 (patch)
treea3d37070d9766419d7b71a307f3e8bfdfde267fd /src/gpu/GrTextureRenderTargetProxy.cpp
parentb8ea6fb50713edf9b27eff11905255e5199fc432 (diff)
When creating emptyp MipMap proxies, don't instantiate them immediately.
This chnages makes it match how we handle non mipped proxies where we don't actually instantiate them until we need to. Bug: skia: Change-Id: Id0c50eefce43ef1458a3ff0bb1881a817b045279 Reviewed-on: https://skia-review.googlesource.com/106966 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrTextureRenderTargetProxy.cpp')
-rw-r--r--src/gpu/GrTextureRenderTargetProxy.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gpu/GrTextureRenderTargetProxy.cpp b/src/gpu/GrTextureRenderTargetProxy.cpp
index 2d5dbeee9f..50077c4c0f 100644
--- a/src/gpu/GrTextureRenderTargetProxy.cpp
+++ b/src/gpu/GrTextureRenderTargetProxy.cpp
@@ -19,12 +19,13 @@
// GrRenderTargetProxy) so its constructor must be explicitly called.
GrTextureRenderTargetProxy::GrTextureRenderTargetProxy(const GrCaps& caps,
const GrSurfaceDesc& desc,
+ GrMipMapped mipMapped,
SkBackingFit fit,
SkBudgeted budgeted,
uint32_t flags)
: GrSurfaceProxy(desc, fit, budgeted, flags)
// for now textures w/ data are always wrapped
- , GrTextureProxy(desc, fit, budgeted, nullptr, 0, flags)
+ , GrTextureProxy(desc, mipMapped, fit, budgeted, nullptr, 0, flags)
, GrRenderTargetProxy(caps, desc, fit, budgeted, flags) {
}
@@ -59,7 +60,7 @@ size_t GrTextureRenderTargetProxy::onUninstantiatedGpuMemorySize() const {
int colorSamplesPerPixel = this->numColorSamples();
if (colorSamplesPerPixel > 1) {
// Add one to account for the resolve buffer.
- ++colorSamplesPerPixel += 1;
+ ++colorSamplesPerPixel;
}
// TODO: do we have enough information to improve this worst case estimate?