Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 351080a8 authored by Greg Daniel's avatar Greg Daniel Committed by Android (Google) Code Review
Browse files

Merge "Make sure we check for valid GrContext when pinning images." into sc-dev

parents 7c8167b0 f8cb5254
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -59,6 +59,10 @@ void SkiaPipeline::onDestroyHardwareResources() {
}

bool SkiaPipeline::pinImages(std::vector<SkImage*>& mutableImages) {
    if (!mRenderThread.getGrContext()) {
        ALOGD("Trying to pin an image with an invalid GrContext");
        return false;
    }
    for (SkImage* image : mutableImages) {
        if (SkImage_pinAsTexture(image, mRenderThread.getGrContext())) {
            mPinnedImages.emplace_back(sk_ref_sp(image));