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

Commit f23b25ab authored by Chris Craik's avatar Chris Craik
Browse files

Remove isRecording() method from renderers

DisplayListRenderer is all that's accessed from java, and is entirely
separate from OpenGLRenderer now.

Change-Id: Ie733be71520c13fdb55dfe3522bb445ae2b50ac1
parent d4e3cdde
Loading
Loading
Loading
Loading
+1 −4
Original line number Original line Diff line number Diff line
@@ -394,10 +394,7 @@ static void android_view_GLES20Canvas_drawBitmapData(JNIEnv* env, jobject clazz,
    SkPaint* paint = reinterpret_cast<SkPaint*>(paintPtr);
    SkPaint* paint = reinterpret_cast<SkPaint*>(paintPtr);
    renderer->drawBitmapData(bitmap, left, top, paint);
    renderer->drawBitmapData(bitmap, left, top, paint);


    // If the renderer is a deferred renderer it will own the bitmap
    // Note - bitmap isn't deleted as DisplayListRenderer owns it now
    if (!renderer->isRecording()) {
        delete bitmap;
    }
}
}


static void android_view_GLES20Canvas_drawBitmapMesh(JNIEnv* env, jobject clazz,
static void android_view_GLES20Canvas_drawBitmapMesh(JNIEnv* env, jobject clazz,
+0 −2
Original line number Original line Diff line number Diff line
@@ -59,8 +59,6 @@ public:


    DisplayListData* finishRecording();
    DisplayListData* finishRecording();


    virtual bool isRecording() const { return true; }

// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// Frame state operations
// Frame state operations
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
+4 −6
Original line number Original line Diff line number Diff line
@@ -1515,17 +1515,15 @@ bool OpenGLRenderer::quickRejectSetupScissor(float left, float top, float right,
        return true;
        return true;
    }
    }


    if (!isRecording()) {
    // not quick rejected, so enable the scissor if clipRequired
    // not quick rejected, so enable the scissor if clipRequired
    mCaches.setScissorEnabled(mScissorOptimizationDisabled || clipRequired);
    mCaches.setScissorEnabled(mScissorOptimizationDisabled || clipRequired);
    mSkipOutlineClip = !roundRectClipRequired;
    mSkipOutlineClip = !roundRectClipRequired;
    }
    return false;
    return false;
}
}


void OpenGLRenderer::debugClip() {
void OpenGLRenderer::debugClip() {
#if DEBUG_CLIP_REGIONS
#if DEBUG_CLIP_REGIONS
    if (!isRecording() && !currentSnapshot()->clipRegion->isEmpty()) {
    if (!currentSnapshot()->clipRegion->isEmpty()) {
        SkPaint paint;
        SkPaint paint;
        paint.setColor(0x7f00ff00);
        paint.setColor(0x7f00ff00);
        drawRegionRects(*(currentSnapshot()->clipRegion, paint);
        drawRegionRects(*(currentSnapshot()->clipRegion, paint);
+0 −8
Original line number Original line Diff line number Diff line
@@ -55,14 +55,6 @@ class ANDROID_API Renderer {
public:
public:
    virtual ~Renderer() {}
    virtual ~Renderer() {}


    /**
     * Indicates whether this renderer is recording drawing commands for later playback.
     * If this method returns true, the drawing commands are deferred.
     */
    virtual bool isRecording() const {
        return false;
    }

    /**
    /**
     * Safely retrieves the mode from the specified xfermode. If the specified
     * Safely retrieves the mode from the specified xfermode. If the specified
     * xfermode is null, the mode is assumed to be SkXfermode::kSrcOver_Mode.
     * xfermode is null, the mode is assumed to be SkXfermode::kSrcOver_Mode.