Remove sample count from GrSurfaceDesc.
This leaves just width, height, and GrPixelConfig. Once we remove the
latter we can replace GrSurfaceDesc with SkISize.
Also remove unused GrRenderTarget::overrideResolveRect
Also remove GrSurfaceProxy::Renderable and use GrRenderable instead.
Change-Id: I652fe6169a22ca33d199b144ec6385286ac07b5a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228570
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrRenderTarget.cpp b/src/gpu/GrRenderTarget.cpp
index fcb0b35..7777cb6 100644
--- a/src/gpu/GrRenderTarget.cpp
+++ b/src/gpu/GrRenderTarget.cpp
@@ -19,10 +19,10 @@
#include "src/gpu/GrStencilAttachment.h"
#include "src/gpu/GrStencilSettings.h"
-GrRenderTarget::GrRenderTarget(GrGpu* gpu, const GrSurfaceDesc& desc, GrProtected isProtected,
- GrStencilAttachment* stencil)
+GrRenderTarget::GrRenderTarget(GrGpu* gpu, const GrSurfaceDesc& desc, int sampleCount,
+ GrProtected isProtected, GrStencilAttachment* stencil)
: INHERITED(gpu, desc, isProtected)
- , fSampleCnt(desc.fSampleCnt)
+ , fSampleCnt(sampleCount)
, fSamplePatternKey(GrSamplePatternDictionary::kInvalidSamplePatternKey)
, fStencilAttachment(stencil) {
fResolveRect = SkRectPriv::MakeILargestInverted();
@@ -43,17 +43,6 @@
}
}
-void GrRenderTarget::overrideResolveRect(const SkIRect rect) {
- fResolveRect = rect;
- if (fResolveRect.isEmpty()) {
- fResolveRect = SkRectPriv::MakeILargestInverted();
- } else {
- if (!fResolveRect.intersect(0, 0, this->width(), this->height())) {
- fResolveRect = SkRectPriv::MakeILargestInverted();
- }
- }
-}
-
void GrRenderTarget::flagAsResolved() {
fResolveRect = SkRectPriv::MakeILargestInverted();
}