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

Commit 43124d22 authored by Derek Sollenberger's avatar Derek Sollenberger Committed by Android (Google) Code Review
Browse files

Merge "Updates resulting from the Skia merge (revision 1327)"

parents b956f37e d39d1aff
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -73,20 +73,6 @@ public:
    static jboolean isOpaque(JNIEnv* env, jobject jcanvas) {
        NPE_CHECK_RETURN_ZERO(env, jcanvas);
        SkCanvas* canvas = GraphicsJNI::getNativeCanvas(env, jcanvas);

        /*
            Currently we cannot support transparency in GL-based canvas' at
            the view level. Therefore we cannot base our answer on the device's
            bitmap, but need to hard-code the answer. If we relax this
            limitation in views, we can simplify the following code as well.
         
            Use the getViewport() call to find out if we're gl-based...
        */
        if (canvas->getViewport(NULL)) {
            return true;
        }
        
        // normal technique, rely on the device's bitmap for the answer
        return canvas->getDevice()->accessBitmap(false).isOpaque();
    }
    
+3 −3
Original line number Diff line number Diff line
@@ -116,9 +116,9 @@ void NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds,
        paint = &defaultPaint;
    }
    
    // if our canvas is GL, draw this as a mesh, which will be faster than
    // in parts (which is faster for raster)
    if (canvas && canvas->getViewport(NULL)) {
    // if our SkCanvas were back by GL we should enable this and draw this as
    // a mesh, which will be faster in most cases.
    if (false) {
        SkNinePatch::DrawMesh(canvas, bounds, bitmap,
                              chunk.xDivs, chunk.numXDivs,
                              chunk.yDivs, chunk.numYDivs,
+4 −5
Original line number Diff line number Diff line
@@ -2434,12 +2434,11 @@ void OpenGLRenderer::getAlphaAndMode(SkPaint* paint, int* alpha, SkXfermode::Mod
}

SkXfermode::Mode OpenGLRenderer::getXfermode(SkXfermode* mode) {
    // In the future we should look at unifying the Porter-Duff modes and
    // SkXferModes so that we can use SkXfermode::IsMode(xfer, &mode).
    if (mode == NULL) {
        return SkXfermode::kSrcOver_Mode;
    SkXfermode::Mode resultMode;
    if (!SkXfermode::AsMode(mode, &resultMode)) {
        resultMode = SkXfermode::kSrcOver_Mode;
    }
    return mode->fMode;
    return resultMode;
}

void OpenGLRenderer::setTextureWrapModes(Texture* texture, GLenum wrapS, GLenum wrapT) {