当前位置: 首页>>代码示例>>C++>>正文


C++ RenderProxy类代码示例

本文整理汇总了C++中RenderProxy的典型用法代码示例。如果您正苦于以下问题:C++ RenderProxy类的具体用法?C++ RenderProxy怎么用?C++ RenderProxy使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了RenderProxy类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: android_view_ThreadedRenderer_setName

static void android_view_ThreadedRenderer_setName(JNIEnv* env, jobject clazz,
        jlong proxyPtr, jstring jname) {
    RenderProxy* proxy = reinterpret_cast<RenderProxy*>(proxyPtr);
    const char* name = env->GetStringUTFChars(jname, NULL);
    proxy->setName(name);
    env->ReleaseStringUTFChars(jname, name);
}
开发者ID:020gzh,项目名称:platform_frameworks_base,代码行数:7,代码来源:android_view_ThreadedRenderer.cpp

示例2: android_view_ThreadedRenderer_copyLayerInto

static jboolean android_view_ThreadedRenderer_copyLayerInto(JNIEnv* env, jobject clazz,
        jlong proxyPtr, jlong layerPtr, jlong bitmapPtr) {
    RenderProxy* proxy = reinterpret_cast<RenderProxy*>(proxyPtr);
    DeferredLayerUpdater* layer = reinterpret_cast<DeferredLayerUpdater*>(layerPtr);
    SkBitmap* bitmap = reinterpret_cast<SkBitmap*>(bitmapPtr);
    return proxy->copyLayerInto(layer, bitmap);
}
开发者ID:cuijinquan,项目名称:platform_frameworks_base,代码行数:7,代码来源:android_view_ThreadedRenderer.cpp

示例3: android_view_ThreadedRenderer_setup

static void android_view_ThreadedRenderer_setup(JNIEnv* env, jobject clazz, jlong proxyPtr,
        jint width, jint height,
        jfloat lightX, jfloat lightY, jfloat lightZ, jfloat lightRadius,
        jint ambientShadowAlpha, jint spotShadowAlpha) {
    RenderProxy* proxy = reinterpret_cast<RenderProxy*>(proxyPtr);
    proxy->setup(width, height, (Vector3){lightX, lightY, lightZ}, lightRadius,
            ambientShadowAlpha, spotShadowAlpha);
}
开发者ID:cuijinquan,项目名称:platform_frameworks_base,代码行数:8,代码来源:android_view_ThreadedRenderer.cpp

示例4: android_view_ThreadedRenderer_copyLayerInto

static jboolean android_view_ThreadedRenderer_copyLayerInto(JNIEnv* env, jobject clazz,
        jlong proxyPtr, jlong layerPtr, jobject jbitmap) {
    RenderProxy* proxy = reinterpret_cast<RenderProxy*>(proxyPtr);
    DeferredLayerUpdater* layer = reinterpret_cast<DeferredLayerUpdater*>(layerPtr);
    SkBitmap bitmap;
    GraphicsJNI::getSkBitmap(env, jbitmap, &bitmap);
    return proxy->copyLayerInto(layer, bitmap);
}
开发者ID:020gzh,项目名称:platform_frameworks_base,代码行数:8,代码来源:android_view_ThreadedRenderer.cpp

示例5: draw

static void draw(JNIEnv* env, jclass clazz, jlong rendererPtr) {
    RenderProxy* proxy = reinterpret_cast<RenderProxy*>(rendererPtr);
    nsecs_t vsync = systemTime(CLOCK_MONOTONIC);
    UiFrameInfoBuilder(proxy->frameInfo())
            .setVsync(vsync, vsync)
            .addFlag(FrameInfoFlags::SurfaceCanvas);
    proxy->syncAndDrawFrame();
}
开发者ID:020gzh,项目名称:platform_frameworks_base,代码行数:8,代码来源:android_view_Surface.cpp

示例6: android_view_ThreadedRenderer_pauseSurface

static jboolean android_view_ThreadedRenderer_pauseSurface(JNIEnv* env, jobject clazz,
        jlong proxyPtr, jobject jsurface) {
    RenderProxy* proxy = reinterpret_cast<RenderProxy*>(proxyPtr);
    sp<ANativeWindow> window;
    if (jsurface) {
        window = android_view_Surface_getNativeWindow(env, jsurface);
    }
    return proxy->pauseSurface(window);
}
开发者ID:020gzh,项目名称:platform_frameworks_base,代码行数:9,代码来源:android_view_ThreadedRenderer.cpp

示例7: android_view_ThreadedRenderer_syncAndDrawFrame

static int android_view_ThreadedRenderer_syncAndDrawFrame(JNIEnv* env, jobject clazz,
        jlong proxyPtr, jlongArray frameInfo, jint frameInfoSize) {
    LOG_ALWAYS_FATAL_IF(frameInfoSize != UI_THREAD_FRAME_INFO_SIZE,
            "Mismatched size expectations, given %d expected %d",
            frameInfoSize, UI_THREAD_FRAME_INFO_SIZE);
    RenderProxy* proxy = reinterpret_cast<RenderProxy*>(proxyPtr);
    env->GetLongArrayRegion(frameInfo, 0, frameInfoSize, proxy->frameInfo());
    return proxy->syncAndDrawFrame();
}
开发者ID:020gzh,项目名称:platform_frameworks_base,代码行数:9,代码来源:android_view_ThreadedRenderer.cpp

示例8: android_view_ThreadedRenderer_setProgramAtlas

static void android_view_ThreadedRenderer_setProgramAtlas(JNIEnv* env, jobject clazz,
        jlong proxyPtr, jobject fileDescriptor, jint length, jlongArray programMap, jint programCount) {
    if (!fileDescriptor || programCount <= 0) {
        ALOGW("Failed to initialize program atlas, invalid program count: %d", programCount);
        return;
    }
    int fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
    int64_t* pmap = new int64_t[programCount];
    env->GetLongArrayRegion(programMap, 0, programCount, pmap);

    RenderProxy* proxy = reinterpret_cast<RenderProxy*>(proxyPtr);
    proxy->setProgramAtlas(fd, length, pmap, programCount);
}
开发者ID:aurorarom,项目名称:JsonUtil,代码行数:13,代码来源:android_view_ThreadedRenderer.cpp

示例9: create

static jlong create(JNIEnv* env, jclass clazz, jlong rootNodePtr, jlong surfacePtr) {
    RenderNode* rootNode = reinterpret_cast<RenderNode*>(rootNodePtr);
    sp<Surface> surface(reinterpret_cast<Surface*>(surfacePtr));
    ContextFactory factory;
    RenderProxy* proxy = new RenderProxy(false, rootNode, &factory);
    proxy->loadSystemProperties();
    proxy->setSwapBehavior(kSwap_discardBuffer);
    proxy->initialize(surface);
    // Shadows can't be used via this interface, so just set the light source
    // to all 0s. (and width & height are unused, TODO remove them)
    proxy->setup(0, 0, (Vector3){0, 0, 0}, 0, 0, 0);
    return (jlong) proxy;
}
开发者ID:cuijinquan,项目名称:platform_frameworks_base,代码行数:13,代码来源:android_view_Surface.cpp

示例10: android_view_ThreadedRenderer_setAtlas

static void android_view_ThreadedRenderer_setAtlas(JNIEnv* env, jobject clazz,
        jlong proxyPtr, jobject graphicBuffer, jlongArray atlasMapArray) {
    sp<GraphicBuffer> buffer = graphicBufferForJavaObject(env, graphicBuffer);
    jsize len = env->GetArrayLength(atlasMapArray);
    if (len <= 0) {
        ALOGW("Failed to initialize atlas, invalid map length: %d", len);
        return;
    }
    int64_t* map = new int64_t[len];
    env->GetLongArrayRegion(atlasMapArray, 0, len, map);

    RenderProxy* proxy = reinterpret_cast<RenderProxy*>(proxyPtr);
    proxy->setTextureAtlas(buffer, map, len);
}
开发者ID:020gzh,项目名称:platform_frameworks_base,代码行数:14,代码来源:android_view_ThreadedRenderer.cpp

示例11: android_view_ThreadedRenderer_detachSurfaceTexture

static void android_view_ThreadedRenderer_detachSurfaceTexture(JNIEnv* env, jobject clazz,
        jlong proxyPtr, jlong layerPtr) {
    RenderProxy* proxy = reinterpret_cast<RenderProxy*>(proxyPtr);
    DeferredLayerUpdater* layer = reinterpret_cast<DeferredLayerUpdater*>(layerPtr);
    proxy->detachSurfaceTexture(layer);
}
开发者ID:020gzh,项目名称:platform_frameworks_base,代码行数:6,代码来源:android_view_ThreadedRenderer.cpp

示例12: draw

static void draw(JNIEnv* env, jclass clazz, jlong rendererPtr) {
    RenderProxy* proxy = reinterpret_cast<RenderProxy*>(rendererPtr);
    nsecs_t frameTimeNs = systemTime(CLOCK_MONOTONIC);
    proxy->syncAndDrawFrame(frameTimeNs, 0, 1.0f);
}
开发者ID:cuijinquan,项目名称:platform_frameworks_base,代码行数:5,代码来源:android_view_Surface.cpp

示例13: android_view_ThreadedRenderer_buildLayer

static void android_view_ThreadedRenderer_buildLayer(JNIEnv* env, jobject clazz,
        jlong proxyPtr, jlong nodePtr) {
    RenderProxy* proxy = reinterpret_cast<RenderProxy*>(proxyPtr);
    RenderNode* node = reinterpret_cast<RenderNode*>(nodePtr);
    proxy->buildLayer(node);
}
开发者ID:020gzh,项目名称:platform_frameworks_base,代码行数:6,代码来源:android_view_ThreadedRenderer.cpp

示例14: android_view_ThreadedRenderer_createTextureLayer

static jlong android_view_ThreadedRenderer_createTextureLayer(JNIEnv* env, jobject clazz,
        jlong proxyPtr) {
    RenderProxy* proxy = reinterpret_cast<RenderProxy*>(proxyPtr);
    DeferredLayerUpdater* layer = proxy->createTextureLayer();
    return reinterpret_cast<jlong>(layer);
}
开发者ID:020gzh,项目名称:platform_frameworks_base,代码行数:6,代码来源:android_view_ThreadedRenderer.cpp

示例15: android_view_ThreadedRenderer_setFrameInterval

static void android_view_ThreadedRenderer_setFrameInterval(JNIEnv* env, jobject clazz,
        jlong proxyPtr, jlong frameIntervalNanos) {
    RenderProxy* proxy = reinterpret_cast<RenderProxy*>(proxyPtr);
    proxy->setFrameInterval(frameIntervalNanos);
}
开发者ID:cuijinquan,项目名称:platform_frameworks_base,代码行数:5,代码来源:android_view_ThreadedRenderer.cpp


注:本文中的RenderProxy类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。