aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrRenderTargetProxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrRenderTargetProxy.cpp')
-rw-r--r--src/gpu/GrRenderTargetProxy.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gpu/GrRenderTargetProxy.cpp b/src/gpu/GrRenderTargetProxy.cpp
index 841d4b18fd..9eb37a0b2f 100644
--- a/src/gpu/GrRenderTargetProxy.cpp
+++ b/src/gpu/GrRenderTargetProxy.cpp
@@ -26,7 +26,7 @@ GrRenderTargetProxy::GrRenderTargetProxy(const GrCaps& caps, const GrSurfaceDesc
, fRenderTargetFlags(GrRenderTargetFlags::kNone) {
// Since we know the newly created render target will be internal, we are able to precompute
// what the flags will ultimately end up being.
- if (caps.usesMixedSamples() && fSampleCnt > 1) {
+ if (caps.usesMixedSamples() && fSampleCnt > 0) {
fRenderTargetFlags |= GrRenderTargetFlags::kMixedSampled;
}
if (caps.maxWindowRectangles() > 0) {
@@ -97,11 +97,7 @@ sk_sp<GrSurface> GrRenderTargetProxy::createSurface(GrResourceProvider* resource
}
size_t GrRenderTargetProxy::onUninstantiatedGpuMemorySize() const {
- int colorSamplesPerPixel = this->numColorSamples();
- if (colorSamplesPerPixel > 1) {
- // Add one for the resolve buffer.
- ++colorSamplesPerPixel;
- }
+ int colorSamplesPerPixel = this->numColorSamples() + 1;
// TODO: do we have enough information to improve this worst case estimate?
return GrSurface::ComputeSize(this->config(), this->width(), this->height(),