diff options
author | Adlai Holler <adlai@google.com> | 2020-09-18 17:44:58 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-09-18 17:44:58 +0000 |
commit | a67b86d081f6b6c824f03b5a5c9aff12d84f9cd0 (patch) | |
tree | 3aebe1756604988f0fe85532dda7105ff5ad0e66 /libs/hwui/pipeline/skia/SkiaPipeline.cpp | |
parent | 99bba2b91ee2dc43ee229fa402956ef491369e91 (diff) | |
parent | ab762153fb6156ac014bd715100697e20aac9516 (diff) |
Merge "Migrate from SkCanvas::getGrContext to SkCanvas::recordingContext"
Diffstat (limited to 'libs/hwui/pipeline/skia/SkiaPipeline.cpp')
-rw-r--r-- | libs/hwui/pipeline/skia/SkiaPipeline.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/hwui/pipeline/skia/SkiaPipeline.cpp b/libs/hwui/pipeline/skia/SkiaPipeline.cpp index 6dd36981e8aa..6e7493cb443d 100644 --- a/libs/hwui/pipeline/skia/SkiaPipeline.cpp +++ b/libs/hwui/pipeline/skia/SkiaPipeline.cpp @@ -86,7 +86,7 @@ void SkiaPipeline::renderLayers(const LightGeometry& lightGeometry, } void SkiaPipeline::renderLayersImpl(const LayerUpdateQueue& layers, bool opaque) { - sk_sp<GrContext> cachedContext; + sk_sp<GrDirectContext> cachedContext; // Render all layers that need to be updated, in order. for (size_t i = 0; i < layers.entries().size(); i++) { @@ -142,7 +142,8 @@ void SkiaPipeline::renderLayersImpl(const LayerUpdateQueue& layers, bool opaque) // cache the current context so that we can defer flushing it until // either all the layers have been rendered or the context changes - GrContext* currentContext = layerNode->getLayerSurface()->getCanvas()->getGrContext(); + GrDirectContext* currentContext = + GrAsDirectContext(layerNode->getLayerSurface()->getCanvas()->recordingContext()); if (cachedContext.get() != currentContext) { if (cachedContext.get()) { ATRACE_NAME("flush layers (context changed)"); @@ -201,7 +202,7 @@ bool SkiaPipeline::createOrUpdateLayer(RenderNode* node, const DamageAccumulator } void SkiaPipeline::prepareToDraw(const RenderThread& thread, Bitmap* bitmap) { - GrContext* context = thread.getGrContext(); + GrDirectContext* context = thread.getGrContext(); if (context) { ATRACE_FORMAT("Bitmap#prepareToDraw %dx%d", bitmap->width(), bitmap->height()); auto image = bitmap->makeImage(); |