Remove public getter for GrSurfaceDrawContext on SkSCanvas.
Made it private and accessible internally via SkCanvasPriv.
Update SkGpuDevice methods/variables after rename of GrDrawSurfaceContext.
Cq-Include-Trybots: luci.skia.skia.primary:Canary-G3,Canary-Flutter,Canary-Android
Change-Id: I3da64cee1de03c201243ee6c7ccd4b4c44cad8c9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/346498
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/samplecode/SampleCCPRGeometry.cpp b/samplecode/SampleCCPRGeometry.cpp
index c67875f..59c6581 100644
--- a/samplecode/SampleCCPRGeometry.cpp
+++ b/samplecode/SampleCCPRGeometry.cpp
@@ -14,6 +14,7 @@
#include "include/core/SkPath.h"
#include "include/gpu/GrDirectContext.h"
#include "samplecode/Sample.h"
+#include "src/core/SkCanvasPriv.h"
#include "src/core/SkRectPriv.h"
#include "src/gpu/GrDirectContextPriv.h"
#include "src/gpu/GrGpu.h"
@@ -191,8 +192,7 @@
if (fDoStroke) {
caption.appendf(" (stroke_width=%f)", fStrokeWidth);
- } else if (GrSurfaceDrawContext* rtc =
- canvas->internal_private_accessTopLayerRenderTargetContext()) {
+ } else if (GrSurfaceDrawContext* sdc = SkCanvasPriv::TopDeviceSurfaceDrawContext(canvas)) {
// Render coverage count.
auto ctx = canvas->recordingContext();
SkASSERT(ctx);
@@ -210,7 +210,7 @@
paint.setColorFragmentProcessor(VisualizeCoverageCountFP::Make(
GrTextureEffect::Make(ccbuff->readSurfaceView(), ccbuff->colorInfo().alphaType())));
paint.setPorterDuffXPFactory(SkBlendMode::kSrcOver);
- rtc->drawRect(nullptr, std::move(paint), GrAA::kNo, SkMatrix::I(),
+ sdc->drawRect(nullptr, std::move(paint), GrAA::kNo, SkMatrix::I(),
SkRect::MakeIWH(this->width(), this->height()));
} else {
caption = "Use GPU backend to visualize geometry.";