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

Commit 3a091b79 authored by Dan Albert's avatar Dan Albert
Browse files

resolved conflicts for merge of 8e0cfe7c to lmp-mr1-dev-plus-aosp

Change-Id: I068d2a0fb118d4e2b4c1e546bebfcbc2cb120d36
parents a8f7a40b 8e0cfe7c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -43,8 +43,11 @@ static void FromColor_D32(void* dst, const SkColor src[], int width,

static void FromColor_D32_Raw(void* dst, const SkColor src[], int width,
                          int, int) {
    // Needed to thwart the unreachable code detection from clang.
    static const bool sk_color_ne_zero = SK_COLOR_MATCHES_PMCOLOR_BYTE_ORDER;

    // SkColor's ordering may be different from SkPMColor
    if (SK_COLOR_MATCHES_PMCOLOR_BYTE_ORDER) {
    if (sk_color_ne_zero) {
        memcpy(dst, src, width * sizeof(SkColor));
        return;
    }
+2 −8
Original line number Diff line number Diff line
@@ -49,12 +49,6 @@ jmethodID gInsetStruct_constructorMethodID;

using namespace android;

static inline int32_t validOrNeg1(bool isValid, int32_t value) {
//    return isValid ? value : -1;
    SkASSERT((int)isValid == 0 || (int)isValid == 1);
    return ((int32_t)isValid - 1) | value;
}

jstring getMimeTypeString(JNIEnv* env, SkImageDecoder::Format format) {
    static const struct {
        SkImageDecoder::Format fFormat;
@@ -185,8 +179,8 @@ public:

        const size_t size = sk_64_asS32(size64);
        if (size > mSize) {
            ALOGW("bitmap marked for reuse (%d bytes) can't fit new bitmap (%d bytes)",
                    mSize, size);
            ALOGW("bitmap marked for reuse (%u bytes) can't fit new bitmap "
                  "(%zu bytes)", mSize, size);
            return false;
        }

+1 −2
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ class SkCanvas;

namespace android {
class Paint;
class TypefaceImpl;
struct TypefaceImpl;
}

class GraphicsJNI {
@@ -205,7 +205,6 @@ public:

private:
    JavaVM* fVM;
    bool fAllocateInJavaHeap;
    jbyteArray fStorageObj;
    int fAllocCount;
};
+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ void NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds,
    const int32_t* yDivs = chunk.getYDivs();
    // 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) {
    if ((false)) {
        SkNinePatch::DrawMesh(canvas, bounds, bitmap,
                              xDivs, chunk.numXDivs,
                              yDivs, chunk.numYDivs,
+6 −6
Original line number Diff line number Diff line
@@ -97,12 +97,12 @@ static jlong nativeOpen(JNIEnv* env, jclass thiz, jint fd, jlong size) {
        switch (error) {
            case FPDF_ERR_PASSWORD:
            case FPDF_ERR_SECURITY: {
                jniThrowException(env, "java/lang/SecurityException",
                        "cannot create document. Error:" + error);
                jniThrowExceptionFmt(env, "java/lang/SecurityException",
                        "cannot create document. Error: %ld", error);
            } break;
            default: {
                jniThrowException(env, "java/io/IOException",
                        "cannot create document. Error:" + error);
                jniThrowExceptionFmt(env, "java/io/IOException",
                        "cannot create document. Error: %ld", error);
            } break;
        }
        destroyLibraryIfNeeded();
@@ -169,8 +169,8 @@ static void nativeWrite(JNIEnv* env, jclass thiz, jlong documentPtr, jint fd) {
    writer.WriteBlock = &writeBlock;
    const bool success = FPDF_SaveAsCopy(document, &writer, FPDF_NO_INCREMENTAL);
    if (!success) {
        jniThrowException(env, "java/io/IOException",
                "cannot write to fd. Error:" + errno);
        jniThrowExceptionFmt(env, "java/io/IOException",
                "cannot write to fd. Error: %d", errno);
        destroyLibraryIfNeeded();
    }
}
Loading