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

Commit 60108e62 authored by Alex Sakhartchouk's avatar Alex Sakhartchouk Committed by Android (Google) Code Review
Browse files

Merge "Preparing libRS for for compilation on host."

parents cb3cf992 6c72eec0
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -190,14 +190,14 @@ nContextSetSurface(JNIEnv *_env, jobject _this, RsContext con, jint width, jint
{
    LOG_API("nContextSetSurface, con(%p), width(%i), height(%i), surface(%p)", con, width, height, (Surface *)wnd);

    Surface * window = NULL;
    ANativeWindow * window = NULL;
    if (wnd == NULL) {

    } else {
        window = (Surface*) android_Surface_getNativeWindow(_env, wnd).get();
        window = android_Surface_getNativeWindow(_env, wnd).get();
    }

    rsContextSetSurface(con, width, height, window, 1);
    rsContextSetSurface(con, width, height, window);
}

static void
+2 −0
Original line number Diff line number Diff line
@@ -50,6 +50,8 @@ typedef void * RsProgramFragment;
typedef void * RsProgramStore;
typedef void * RsProgramRaster;

typedef void * RsNativeWindow;

typedef void (* RsBitmapCallback_t)(void *);

typedef struct {
+2 −2
Original line number Diff line number Diff line
@@ -300,7 +300,7 @@ bool rsdGLInit(const Context *rsc) {
}


bool rsdGLSetSurface(const Context *rsc, uint32_t w, uint32_t h, ANativeWindow *sur) {
bool rsdGLSetSurface(const Context *rsc, uint32_t w, uint32_t h, RsNativeWindow sur) {
    RsdHal *dc = (RsdHal *)rsc->mHal.drv;

    EGLBoolean ret;
@@ -319,7 +319,7 @@ bool rsdGLSetSurface(const Context *rsc, uint32_t w, uint32_t h, ANativeWindow *
        dc->gl.height = 1;
    }

    dc->gl.wndSurface = sur;
    dc->gl.wndSurface = (ANativeWindow *)sur;
    if (dc->gl.wndSurface != NULL) {
        dc->gl.width = w;
        dc->gl.height = h;
+2 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#define RSD_GL_H

#include <rs_hal.h>
#include <EGL/egl.h>

class RsdShaderCache;
class RsdVertexArrayState;
@@ -74,7 +75,7 @@ typedef struct RsdGLRec {
bool rsdGLInit(const android::renderscript::Context *rsc);
void rsdGLShutdown(const android::renderscript::Context *rsc);
bool rsdGLSetSurface(const android::renderscript::Context *rsc,
                     uint32_t w, uint32_t h, ANativeWindow *sur);
                     uint32_t w, uint32_t h, RsNativeWindow sur);
void rsdGLSwap(const android::renderscript::Context *rsc);
void rsdGLCheckError(const android::renderscript::Context *rsc,
                     const char *msg, bool isFatal = false);
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ ContextResume {
ContextSetSurface {
	param uint32_t width
	param uint32_t height
	param ANativeWindow *sur
	param RsNativeWindow sur
	}

ContextDump {
Loading