Revert "Make SkGpuDevice hold a GrRecordingContext"
This reverts commit c8b721b08619f5b515b5dc066999205fa6aa56c9.
Reason for revert: Looks like it's causing build failures around
MakeRenderTargetContext on the roll.
Original change's description:
> Make SkGpuDevice hold a GrRecordingContext
>
> This makes the code reflect what is actually going on. During DDL
> recording the SkGpuDevice only holds a recording context.
>
> This can't land until the following Chrome-side CL lands:
>
> https://chromium-review.googlesource.com/c/chromium/src/+/2277964 (Add GrContext.h include to skia renderer for upcoming Skia roll)
>
> Change-Id: I69cfa744226c315c25f68fc509b7b59ec38bbf31
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299867
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Adlai Holler <adlai@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,adlai@google.com
Change-Id: I6a362daf7c40e36ed9f068c5b2d477c16a3f778e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300853
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 9060950..48b6982 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -281,6 +281,13 @@
return format.isValid();
}
+int GrContext::maxSurfaceSampleCountForColorType(SkColorType colorType) const {
+ GrBackendFormat format =
+ this->caps()->getDefaultBackendFormat(SkColorTypeToGrColorType(colorType),
+ GrRenderable::kYes);
+ return this->caps()->maxRenderTargetSampleCount(format);
+}
+
////////////////////////////////////////////////////////////////////////////////
bool GrContext::wait(int numSemaphores, const GrBackendSemaphore waitSemaphores[]) {