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

Commit 4d275ed1 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change Id3e3d0a3

* changes:
  Fix the broken build of omxjpegdecoder: http://b/2299035.
parents 3daf9cf2 b3550127
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ LOCAL_SHARED_LIBRARIES := \
    libstagefright

LOCAL_C_INCLUDES := \
    $(JNI_H_INCLUDE) \
    $(TOP)/external/jpeg \
    $(TOP)/external/skia/include/config \
    $(TOP)/external/skia/include/core \
+2 −2
Original line number Diff line number Diff line
@@ -31,11 +31,11 @@ StreamSource::~StreamSource() {
    mStream = NULL;
}

status_t StreamSource::InitCheck() const {
status_t StreamSource::initCheck() const {
    return mStream != NULL ? OK : NO_INIT;
}

ssize_t StreamSource::read_at(off_t offset, void *data, size_t size) {
ssize_t StreamSource::readAt(off_t offset, void *data, size_t size) {
    Mutex::Autolock autoLock(mLock);

    mStream->rewind();
+2 −2
Original line number Diff line number Diff line
@@ -31,8 +31,8 @@ class StreamSource : public DataSource {
public:
    // Pass the ownership of SkStream to StreamSource.
    StreamSource(SkStream *SkStream);
    status_t InitCheck() const;
    virtual ssize_t read_at(off_t offset, void *data, size_t size);
    virtual status_t initCheck() const;
    virtual ssize_t readAt(off_t offset, void *data, size_t size);
    virtual status_t getSize(off_t *size);

protected:
+11 −0
Original line number Diff line number Diff line
@@ -25,6 +25,17 @@
#include "SkStream.h"
#include "omx_jpeg_decoder.h"

class SkJPEGImageDecoder : public SkImageDecoder {
public:
    virtual Format getFormat() const {
        return kJPEG_Format;
    }

protected:
    virtual bool onDecode(SkStream* stream, SkBitmap* bm,
                          SkBitmap::Config pref, Mode);
};

int nullObjectReturn(const char msg[]) {
    if (msg) {
        SkDebugf("--- %s\n", msg);