Export symbols for the newly exposed APEX/internal headers
Bug: 137655431 Test: CtsUiRenderingTestCases Change-Id: I71c6d1a53ae080bf104848679ee62a77cf07c9fa
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <android/bitmap.h>
|
||||
#include <android/data_space.h>
|
||||
#include <cutils/compiler.h>
|
||||
#include <jni.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
@@ -37,31 +38,31 @@ typedef struct ABitmap ABitmap;
|
||||
* NOTE: This API does not need to remain as an APEX API if/when we pull libjnigraphics into the
|
||||
* UI module.
|
||||
*/
|
||||
AndroidBitmapInfo ABitmap_getInfoFromJava(JNIEnv* env, jobject bitmapObj);
|
||||
ANDROID_API AndroidBitmapInfo ABitmap_getInfoFromJava(JNIEnv* env, jobject bitmapObj);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return ptr to an opaque handle to the native bitmap or null if the java bitmap has been recycled
|
||||
* or does not exist.
|
||||
*/
|
||||
ABitmap* ABitmap_acquireBitmapFromJava(JNIEnv* env, jobject bitmapObj);
|
||||
ANDROID_API ABitmap* ABitmap_acquireBitmapFromJava(JNIEnv* env, jobject bitmapObj);
|
||||
|
||||
ABitmap* ABitmap_copy(ABitmap* srcBitmap, AndroidBitmapFormat dstFormat);
|
||||
ANDROID_API ABitmap* ABitmap_copy(ABitmap* srcBitmap, AndroidBitmapFormat dstFormat);
|
||||
|
||||
void ABitmap_acquireRef(ABitmap* bitmap);
|
||||
void ABitmap_releaseRef(ABitmap* bitmap);
|
||||
ANDROID_API void ABitmap_acquireRef(ABitmap* bitmap);
|
||||
ANDROID_API void ABitmap_releaseRef(ABitmap* bitmap);
|
||||
|
||||
AndroidBitmapInfo ABitmap_getInfo(ABitmap* bitmap);
|
||||
ADataSpace ABitmap_getDataSpace(ABitmap* bitmap);
|
||||
ANDROID_API AndroidBitmapInfo ABitmap_getInfo(ABitmap* bitmap);
|
||||
ANDROID_API ADataSpace ABitmap_getDataSpace(ABitmap* bitmap);
|
||||
|
||||
void* ABitmap_getPixels(ABitmap* bitmap);
|
||||
void ABitmap_notifyPixelsChanged(ABitmap* bitmap);
|
||||
ANDROID_API void* ABitmap_getPixels(ABitmap* bitmap);
|
||||
ANDROID_API void ABitmap_notifyPixelsChanged(ABitmap* bitmap);
|
||||
|
||||
AndroidBitmapFormat ABitmapConfig_getFormatFromConfig(JNIEnv* env, jobject bitmapConfigObj);
|
||||
jobject ABitmapConfig_getConfigFromFormat(JNIEnv* env, AndroidBitmapFormat format);
|
||||
ANDROID_API AndroidBitmapFormat ABitmapConfig_getFormatFromConfig(JNIEnv* env, jobject bitmapConfigObj);
|
||||
ANDROID_API jobject ABitmapConfig_getConfigFromFormat(JNIEnv* env, AndroidBitmapFormat format);
|
||||
|
||||
// NDK access
|
||||
int ABitmap_compress(const AndroidBitmapInfo* info, ADataSpace dataSpace, const void* pixels,
|
||||
ANDROID_API int ABitmap_compress(const AndroidBitmapInfo* info, ADataSpace dataSpace, const void* pixels,
|
||||
AndroidBitmapCompressFormat format, int32_t quality, void* userContext,
|
||||
AndroidBitmap_CompressWriteFunc);
|
||||
/**
|
||||
@@ -75,7 +76,7 @@ int ABitmap_compress(const AndroidBitmapInfo* info, ADataSpace dataSpace, const
|
||||
* a reference on the buffer, and the client must call
|
||||
* AHardwareBuffer_release when finished with it.
|
||||
*/
|
||||
AHardwareBuffer* ABitmap_getHardwareBuffer(ABitmap* bitmap);
|
||||
ANDROID_API AHardwareBuffer* ABitmap_getHardwareBuffer(ABitmap* bitmap);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <android/graphics/paint.h>
|
||||
#include <android/native_window.h>
|
||||
#include <android/rect.h>
|
||||
#include <cutils/compiler.h>
|
||||
#include <jni.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
@@ -30,24 +31,24 @@ __BEGIN_DECLS
|
||||
typedef struct ACanvas ACanvas;
|
||||
|
||||
// One of AHardwareBuffer_Format.
|
||||
bool ACanvas_isSupportedPixelFormat(int32_t bufferFormat);
|
||||
ANDROID_API bool ACanvas_isSupportedPixelFormat(int32_t bufferFormat);
|
||||
|
||||
/**
|
||||
* Returns a native handle to a Java android.graphics.Canvas
|
||||
*
|
||||
* @return ACanvas* that is only valid for the life of the jobject.
|
||||
*/
|
||||
ACanvas* ACanvas_getNativeHandleFromJava(JNIEnv* env, jobject canvas);
|
||||
ANDROID_API ACanvas* ACanvas_getNativeHandleFromJava(JNIEnv* env, jobject canvas);
|
||||
|
||||
/**
|
||||
* Creates a canvas that wraps the buffer
|
||||
*
|
||||
* @param buffer is a required param. If no buffer is provided a nullptr will be returned.
|
||||
*/
|
||||
ACanvas* ACanvas_createCanvas(const ANativeWindow_Buffer* buffer,
|
||||
ANDROID_API ACanvas* ACanvas_createCanvas(const ANativeWindow_Buffer* buffer,
|
||||
int32_t /*android_dataspace_t*/ dataspace);
|
||||
|
||||
void ACanvas_destroyCanvas(ACanvas* canvas);
|
||||
ANDROID_API void ACanvas_destroyCanvas(ACanvas* canvas);
|
||||
|
||||
/**
|
||||
* Updates the canvas to render into the pixels in the provided buffer
|
||||
@@ -60,7 +61,7 @@ void ACanvas_destroyCanvas(ACanvas* canvas);
|
||||
* method will behave as if nullptr were passed as the input buffer and the previous buffer
|
||||
* will still be released.
|
||||
*/
|
||||
bool ACanvas_setBuffer(ACanvas* canvas, const ANativeWindow_Buffer* buffer,
|
||||
ANDROID_API bool ACanvas_setBuffer(ACanvas* canvas, const ANativeWindow_Buffer* buffer,
|
||||
int32_t /*android_dataspace_t*/ dataspace);
|
||||
|
||||
/**
|
||||
@@ -68,21 +69,21 @@ bool ACanvas_setBuffer(ACanvas* canvas, const ANativeWindow_Buffer* buffer,
|
||||
*
|
||||
* @param clipRect required
|
||||
*/
|
||||
void ACanvas_clipRect(ACanvas* canvas, const ARect* clipRect, bool doAntiAlias = false);
|
||||
ANDROID_API void ACanvas_clipRect(ACanvas* canvas, const ARect* clipRect, bool doAntiAlias = false);
|
||||
|
||||
/**
|
||||
* Clips operations on the canvas to the difference of the current clip and the provided clipRect.
|
||||
*
|
||||
* @param clipRect required
|
||||
*/
|
||||
void ACanvas_clipOutRect(ACanvas* canvas, const ARect* clipRect, bool doAntiAlias = false);
|
||||
ANDROID_API void ACanvas_clipOutRect(ACanvas* canvas, const ARect* clipRect, bool doAntiAlias = false);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param rect required
|
||||
* @param paint required
|
||||
*/
|
||||
void ACanvas_drawRect(ACanvas* canvas, const ARect* rect, const APaint* paint);
|
||||
ANDROID_API void ACanvas_drawRect(ACanvas* canvas, const ARect* rect, const APaint* paint);
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -91,7 +92,7 @@ void ACanvas_drawRect(ACanvas* canvas, const ARect* rect, const APaint* paint);
|
||||
* @param top
|
||||
* @param paint
|
||||
*/
|
||||
void ACanvas_drawBitmap(ACanvas* canvas, const ABitmap* bitmap, float left, float top,
|
||||
ANDROID_API void ACanvas_drawBitmap(ACanvas* canvas, const ABitmap* bitmap, float left, float top,
|
||||
const APaint* paint);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
@@ -16,15 +16,18 @@
|
||||
#ifndef ANDROID_GRAPHICS_JNI_RUNTIME_H
|
||||
#define ANDROID_GRAPHICS_JNI_RUNTIME_H
|
||||
|
||||
#include <cutils/compiler.h>
|
||||
#include <jni.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
void init_android_graphics();
|
||||
ANDROID_API void init_android_graphics();
|
||||
|
||||
int register_android_graphics_classes(JNIEnv* env);
|
||||
ANDROID_API int register_android_graphics_classes(JNIEnv* env);
|
||||
|
||||
void zygote_preload_graphics();
|
||||
ANDROID_API int register_android_graphics_GraphicsStatsService(JNIEnv* env);
|
||||
|
||||
ANDROID_API void zygote_preload_graphics();
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#define ANDROID_GRAPHICS_MATRIX_H
|
||||
|
||||
#include <jni.h>
|
||||
#include <cutils/compiler.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
@@ -31,7 +32,7 @@ __BEGIN_DECLS
|
||||
* @return true if the values param was populated and false otherwise.
|
||||
|
||||
*/
|
||||
bool AMatrix_getContents(JNIEnv* env, jobject matrixObj, float values[9]);
|
||||
ANDROID_API bool AMatrix_getContents(JNIEnv* env, jobject matrixObj, float values[9]);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#ifndef ANDROID_GRAPHICS_PAINT_H
|
||||
#define ANDROID_GRAPHICS_PAINT_H
|
||||
|
||||
#include <cutils/compiler.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
@@ -35,11 +36,11 @@ enum ABlendMode {
|
||||
ABLEND_MODE_SRC = 2,
|
||||
};
|
||||
|
||||
APaint* APaint_createPaint();
|
||||
ANDROID_API APaint* APaint_createPaint();
|
||||
|
||||
void APaint_destroyPaint(APaint* paint);
|
||||
ANDROID_API void APaint_destroyPaint(APaint* paint);
|
||||
|
||||
void APaint_setBlendMode(APaint* paint, ABlendMode blendMode);
|
||||
ANDROID_API void APaint_setBlendMode(APaint* paint, ABlendMode blendMode);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#ifndef ANDROID_GRAPHICS_REGION_H
|
||||
#define ANDROID_GRAPHICS_REGION_H
|
||||
|
||||
#include <cutils/compiler.h>
|
||||
#include <android/rect.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include <jni.h>
|
||||
@@ -35,19 +36,19 @@ typedef struct ARegionIterator ARegionIterator;
|
||||
* @return ARegionIterator that must be closed and must not live longer than the life
|
||||
* of the jobject. It returns nullptr if the region is not a valid object.
|
||||
*/
|
||||
ARegionIterator* ARegionIterator_acquireIterator(JNIEnv* env, jobject region);
|
||||
ANDROID_API ARegionIterator* ARegionIterator_acquireIterator(JNIEnv* env, jobject region);
|
||||
|
||||
void ARegionIterator_releaseIterator(ARegionIterator* iterator);
|
||||
ANDROID_API void ARegionIterator_releaseIterator(ARegionIterator* iterator);
|
||||
|
||||
bool ARegionIterator_isComplex(ARegionIterator* iterator);
|
||||
ANDROID_API bool ARegionIterator_isComplex(ARegionIterator* iterator);
|
||||
|
||||
bool ARegionIterator_isDone(ARegionIterator* iterator);
|
||||
ANDROID_API bool ARegionIterator_isDone(ARegionIterator* iterator);
|
||||
|
||||
void ARegionIterator_next(ARegionIterator* iterator);
|
||||
ANDROID_API void ARegionIterator_next(ARegionIterator* iterator);
|
||||
|
||||
ARect ARegionIterator_getRect(ARegionIterator* iterator);
|
||||
ANDROID_API ARect ARegionIterator_getRect(ARegionIterator* iterator);
|
||||
|
||||
ARect ARegionIterator_getTotalBounds(ARegionIterator* iterator);
|
||||
ANDROID_API ARect ARegionIterator_getTotalBounds(ARegionIterator* iterator);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#ifndef ANDROID_GRAPHICS_RENDERTHREAD_H
|
||||
#define ANDROID_GRAPHICS_RENDERTHREAD_H
|
||||
|
||||
#include <cutils/compiler.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
@@ -26,7 +27,7 @@ __BEGIN_DECLS
|
||||
* function requires a valid fd, but does not persist or assume ownership of the fd
|
||||
* outside the scope of this function.
|
||||
*/
|
||||
void ARenderThread_dumpGraphicsMemory(int fd);
|
||||
ANDROID_API void ARenderThread_dumpGraphicsMemory(int fd);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "BitmapFactory.h"
|
||||
#include "CreateJavaOutputStreamAdaptor.h"
|
||||
#include "GraphicsJNI.h"
|
||||
#include "MimeType.h"
|
||||
#include "NinePatchPeeker.h"
|
||||
#include "SkAndroidCodec.h"
|
||||
#include "SkBRDAllocator.h"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef _ANDROID_GRAPHICS_GRAPHICS_JNI_H_
|
||||
#define _ANDROID_GRAPHICS_GRAPHICS_JNI_H_
|
||||
|
||||
#include <cutils/compiler.h>
|
||||
|
||||
#include "Bitmap.h"
|
||||
#include "SkBitmap.h"
|
||||
#include "SkBRDAllocator.h"
|
||||
@@ -75,7 +77,7 @@ public:
|
||||
static SkPoint* jpointf_to_point(JNIEnv*, jobject jpointf, SkPoint* point);
|
||||
static void point_to_jpointf(const SkPoint& point, JNIEnv*, jobject jpointf);
|
||||
|
||||
static android::Canvas* getNativeCanvas(JNIEnv*, jobject canvas);
|
||||
ANDROID_API static android::Canvas* getNativeCanvas(JNIEnv*, jobject canvas);
|
||||
static android::Bitmap* getNativeBitmap(JNIEnv*, jobject bitmap);
|
||||
static SkImageInfo getBitmapInfo(JNIEnv*, jobject bitmap, uint32_t* outRowBytes,
|
||||
bool* isHardware);
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#include <stats_event.h>
|
||||
#include <stats_pull_atom_callback.h>
|
||||
#include <statslog.h>
|
||||
|
||||
#include "android/graphics/jni_runtime.h"
|
||||
#include "GraphicsJNI.h"
|
||||
|
||||
namespace android {
|
||||
@@ -171,6 +173,9 @@ static void nativeDestructor(JNIEnv* env, jobject javaObject) {
|
||||
gGraphicsStatsServiceObject = nullptr;
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
using namespace android;
|
||||
|
||||
static const JNINativeMethod sMethods[] =
|
||||
{{"nGetAshmemSize", "()I", (void*)getAshmemSize},
|
||||
{"nCreateDump", "(IZ)J", (void*)createDump},
|
||||
@@ -190,5 +195,3 @@ int register_android_graphics_GraphicsStatsService(JNIEnv* env) {
|
||||
return jniRegisterNativeMethods(env, "android/graphics/GraphicsStatsService", sMethods,
|
||||
NELEM(sMethods));
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cutils/compiler.h>
|
||||
#include "SkEncodedImageFormat.h"
|
||||
|
||||
const char* getMimeType(SkEncodedImageFormat);
|
||||
ANDROID_API const char* getMimeType(SkEncodedImageFormat);
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <android/bitmap.h>
|
||||
#include <android/data_space.h>
|
||||
#include <android/imagedecoder.h>
|
||||
#include <android/graphics/MimeType.h>
|
||||
#include <MimeType.h>
|
||||
#include <android/rect.h>
|
||||
#include <hwui/ImageDecoder.h>
|
||||
#include <log/log.h>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <android/graphics/jni_runtime.h>
|
||||
#include <nativehelper/JNIHelp.h>
|
||||
#include "jni.h"
|
||||
#include "utils/Log.h"
|
||||
@@ -49,7 +50,6 @@ int register_android_server_PersistentDataBlockService(JNIEnv* env);
|
||||
int register_android_server_Watchdog(JNIEnv* env);
|
||||
int register_android_server_HardwarePropertiesManagerService(JNIEnv* env);
|
||||
int register_android_server_SyntheticPasswordManager(JNIEnv* env);
|
||||
int register_android_graphics_GraphicsStatsService(JNIEnv* env);
|
||||
int register_android_hardware_display_DisplayViewport(JNIEnv* env);
|
||||
int register_android_server_net_NetworkStatsFactory(JNIEnv* env);
|
||||
int register_android_server_net_NetworkStatsService(JNIEnv* env);
|
||||
|
||||
Reference in New Issue
Block a user