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

Commit 2173ea28 authored by Derek Sollenberger's avatar Derek Sollenberger
Browse files

Export symbols for the newly exposed APEX/internal headers

Bug: 137655431
Test: CtsUiRenderingTestCases
Change-Id: I71c6d1a53ae080bf104848679ee62a77cf07c9fa
parent 42c50042
Loading
Loading
Loading
Loading
+14 −13
Original line number Diff line number Diff line
@@ -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

+10 −9
Original line number Diff line number Diff line
@@ -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
+6 −3
Original line number Diff line number Diff line
@@ -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

+2 −1
Original line number Diff line number Diff line
@@ -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

+4 −3
Original line number Diff line number Diff line
@@ -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

Loading