am a081c7b8: Merge "Skia API changes as a result of an update to the Skia library."
* commit 'a081c7b8bc5a3ea19fc7562b333fac525b17bc5f': Skia API changes as a result of an update to the Skia library.
This commit is contained in:
committed by
Android Git Automerger
commit
52da99fac8
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <SkImageEncoder.h>
|
||||
#include <SkBitmap.h>
|
||||
#include <SkData.h>
|
||||
#include <SkStream.h>
|
||||
|
||||
using namespace android;
|
||||
@@ -168,7 +169,9 @@ int main(int argc, char** argv)
|
||||
SkDynamicMemoryWStream stream;
|
||||
SkImageEncoder::EncodeStream(&stream, b,
|
||||
SkImageEncoder::kPNG_Type, SkImageEncoder::kDefaultQuality);
|
||||
write(fd, stream.getStream(), stream.getOffset());
|
||||
SkData* streamData = stream.copyToData();
|
||||
write(fd, streamData->data(), streamData->size());
|
||||
streamData->unref();
|
||||
} else {
|
||||
write(fd, &w, 4);
|
||||
write(fd, &h, 4);
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
static void freeCaches(JNIEnv* env, jobject) {
|
||||
// these are called in no particular order
|
||||
SkImageRef_GlobalPool::SetRAMUsed(0);
|
||||
SkGraphics::SetFontCacheUsed(0);
|
||||
SkGraphics::PurgeFontCache();
|
||||
}
|
||||
|
||||
static jboolean isOpaque(JNIEnv* env, jobject jcanvas) {
|
||||
|
||||
Reference in New Issue
Block a user