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

Commit 155854f5 authored by Chris Craik's avatar Chris Craik Committed by Android (Google) Code Review
Browse files

Merge "Remove isRecording() method from renderers"

parents 44c76c97 f23b25ab
Loading
Loading
Loading
Loading
+1 −4
Original line number 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);
    renderer->drawBitmapData(bitmap, left, top, paint);

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

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

    DisplayListData* finishRecording();

    virtual bool isRecording() const { return true; }

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

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

void OpenGLRenderer::debugClip() {
#if DEBUG_CLIP_REGIONS
    if (!isRecording() && !currentSnapshot()->clipRegion->isEmpty()) {
    if (!currentSnapshot()->clipRegion->isEmpty()) {
        SkPaint paint;
        paint.setColor(0x7f00ff00);
        drawRegionRects(*(currentSnapshot()->clipRegion, paint);
+0 −8
Original line number Diff line number Diff line
@@ -55,14 +55,6 @@ class ANDROID_API Renderer {
public:
    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
     * xfermode is null, the mode is assumed to be SkXfermode::kSrcOver_Mode.