Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index 3924260f809468a77d45bd93ae6264ec56af3572..905849254c7fcf5ad6689fe9354cc326ff395992 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -1863,18 +1863,8 @@ GrRenderTarget* SkCanvas::internal_private_accessTopLayerRenderTarget() { |
} |
GrContext* SkCanvas::getGrContext() { |
-#if SK_SUPPORT_GPU |
SkBaseDevice* device = this->getTopDevice(); |
- if (device) { |
- GrRenderTarget* renderTarget = device->accessRenderTarget(); |
- if (renderTarget) { |
- return renderTarget->getContext(); |
- } |
- } |
-#endif |
- |
- return nullptr; |
- |
+ return device ? device->context() : nullptr; |
} |
void SkCanvas::drawDRRect(const SkRRect& outer, const SkRRect& inner, |