summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeon Scroggins <scroggo@google.com>2014-03-27 21:51:37 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-03-27 21:51:37 +0000
commit3dbeca1799421d1fcdfab80ebb44589accd7a791 (patch)
tree32399e24fd907047737b18820da86d473e254b30
parentf8bc9e3b6ade520729aa303d4f914c9362038593 (diff)
parent7a3878cd8f5fd18cf43b2760f108f8c8a3e1794d (diff)
downloadframeworks_base-3dbeca1799421d1fcdfab80ebb44589accd7a791.zip
frameworks_base-3dbeca1799421d1fcdfab80ebb44589accd7a791.tar.gz
frameworks_base-3dbeca1799421d1fcdfab80ebb44589accd7a791.tar.bz2
Merge "Remove SkOmxPixelRef to fix build."
-rw-r--r--media/tests/omxjpegdecoder/Android.mk1
-rw-r--r--media/tests/omxjpegdecoder/SkOmxPixelRef.cpp46
-rw-r--r--media/tests/omxjpegdecoder/SkOmxPixelRef.h52
-rw-r--r--media/tests/omxjpegdecoder/omx_jpeg_decoder.cpp16
-rw-r--r--media/tests/omxjpegdecoder/omx_jpeg_decoder.h2
5 files changed, 0 insertions, 117 deletions
diff --git a/media/tests/omxjpegdecoder/Android.mk b/media/tests/omxjpegdecoder/Android.mk
index 95ae33b..b0bc5d4 100644
--- a/media/tests/omxjpegdecoder/Android.mk
+++ b/media/tests/omxjpegdecoder/Android.mk
@@ -19,7 +19,6 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
omx_jpeg_decoder.cpp \
jpeg_decoder_bench.cpp \
- SkOmxPixelRef.cpp \
StreamSource.cpp
LOCAL_SHARED_LIBRARIES := \
diff --git a/media/tests/omxjpegdecoder/SkOmxPixelRef.cpp b/media/tests/omxjpegdecoder/SkOmxPixelRef.cpp
deleted file mode 100644
index a25e854..0000000
--- a/media/tests/omxjpegdecoder/SkOmxPixelRef.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <media/stagefright/foundation/ADebug.h>
-#include <SkBitmap.h>
-
-#include "SkOmxPixelRef.h"
-
-using namespace android;
-
-SkOmxPixelRef::SkOmxPixelRef(SkColorTable* ctable, MediaBuffer* buffer,
- sp<MediaSource> decoder) {
- mBuffer = buffer;
- mDecoder = decoder;
- mSize = buffer->size();
- mCTable = ctable;
- SkSafeRef(mCTable);
-}
-
-SkOmxPixelRef::~SkOmxPixelRef() {
- mBuffer->release();
- CHECK_EQ(mDecoder->stop(), (status_t)OK);
- SkSafeUnref(mCTable);
-}
-
-void* SkOmxPixelRef::onLockPixels(SkColorTable** ct) {
- *ct = mCTable;
- return mBuffer->data();
-}
-
-void SkOmxPixelRef::onUnlockPixels() {
- // nothing to do
-}
diff --git a/media/tests/omxjpegdecoder/SkOmxPixelRef.h b/media/tests/omxjpegdecoder/SkOmxPixelRef.h
deleted file mode 100644
index 374604c..0000000
--- a/media/tests/omxjpegdecoder/SkOmxPixelRef.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SKOMXPIXELREF_DEFINED
-#define SKOMXPIXELREF_DEFINED
-
-#include <media/stagefright/MediaBuffer.h>
-#include <media/stagefright/OMXClient.h>
-#include <media/stagefright/OMXCodec.h>
-#include <SkPixelRef.h>
-
-namespace android {
-
-class SkOmxPixelRef : public SkPixelRef {
-public:
- SkOmxPixelRef(SkColorTable* ctable, MediaBuffer* buffer,
- sp<MediaSource> decoder);
- virtual ~SkOmxPixelRef();
-
- //! Return the allocation size for the pixels
- size_t getSize() const { return mSize; }
-
- SK_DECLARE_UNFLATTENABLE_OBJECT()
-protected:
- // overrides from SkPixelRef
- virtual void* onLockPixels(SkColorTable**);
- virtual void onUnlockPixels();
-
-private:
- MediaBuffer* mBuffer;
- sp<MediaSource> mDecoder;
- size_t mSize;
- SkColorTable* mCTable;
-
- typedef SkPixelRef INHERITED;
-};
-
-} // namespace android
-#endif // SKOMXPIXELREF_DEFINED
diff --git a/media/tests/omxjpegdecoder/omx_jpeg_decoder.cpp b/media/tests/omxjpegdecoder/omx_jpeg_decoder.cpp
index 53f04bc..3dd988e 100644
--- a/media/tests/omxjpegdecoder/omx_jpeg_decoder.cpp
+++ b/media/tests/omxjpegdecoder/omx_jpeg_decoder.cpp
@@ -34,7 +34,6 @@
#include <SkMallocPixelRef.h>
#include "omx_jpeg_decoder.h"
-#include "SkOmxPixelRef.h"
#include "StreamSource.h"
using namespace android;
@@ -158,10 +157,6 @@ bool OmxJpegImageDecoder::decodeSource(sp<MediaSource> decoder,
printf("Duration in decoder->read(): %.1f (msecs). \n",
duration / 1E3 );
- /* Mark the code for now, since we attend to copy buffer to SkBitmap.
- // Install pixelRef to Bitmap.
- installPixelRef(buffer, decoder, bm);*/
-
// Copy pixels from buffer to bm.
// May need to check buffer->rawBytes() == bm->rawBytes().
CHECK_EQ(buffer->size(), bm->getSize());
@@ -172,17 +167,6 @@ bool OmxJpegImageDecoder::decodeSource(sp<MediaSource> decoder,
return true;
}
-void OmxJpegImageDecoder::installPixelRef(MediaBuffer *buffer, sp<MediaSource> decoder,
- SkBitmap* bm) {
-
- // set bm's pixelref based on the data in buffer.
- SkAutoLockPixels alp(*bm);
- SkPixelRef* pr = new SkOmxPixelRef(NULL, buffer, decoder);
- bm->setPixelRef(pr)->unref();
- bm->lockPixels();
- return;
-}
-
void OmxJpegImageDecoder::configBitmapSize(SkBitmap* bm, SkBitmap::Config pref,
int width, int height) {
bm->setConfig(getColorSpaceConfig(pref), width, height, 0, kOpaque_SkAlphaType);
diff --git a/media/tests/omxjpegdecoder/omx_jpeg_decoder.h b/media/tests/omxjpegdecoder/omx_jpeg_decoder.h
index a313877..e431e72 100644
--- a/media/tests/omxjpegdecoder/omx_jpeg_decoder.h
+++ b/media/tests/omxjpegdecoder/omx_jpeg_decoder.h
@@ -49,8 +49,6 @@ private:
sp<MediaSource> getDecoder(OMXClient* client, const sp<MediaSource>& source);
bool decodeSource(sp<MediaSource> decoder, const sp<MediaSource>& source,
SkBitmap* bm);
- void installPixelRef(MediaBuffer* buffer, sp<MediaSource> decoder,
- SkBitmap* bm);
void configBitmapSize(SkBitmap* bm, SkBitmap::Config pref, int width,
int height);
SkBitmap::Config getColorSpaceConfig(SkBitmap::Config pref);