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


C++ DrawableMap::find方法代码示例

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


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

示例1: createDrawable

static glws::Drawable *
getDrawable(unsigned long long surface_ptr) {
    if (surface_ptr == 0) {
        return NULL;
    }

    DrawableMap::const_iterator it;
    it = drawable_map.find(surface_ptr);
    if (it == drawable_map.end()) {
        // In Fennec we get the egl window surface from Java which isn't
        // traced, so just create a drawable if it doesn't exist in here
        createDrawable(0, surface_ptr);
        it = drawable_map.find(surface_ptr);
        assert(it != drawable_map.end());
    }

    return (it != drawable_map.end()) ? it->second : NULL;
}
开发者ID:Dhanasekahar,项目名称:apitrace,代码行数:18,代码来源:glretrace_egl.cpp

示例2: return

static glws::Drawable *
getDrawable(unsigned long drawable_id) {
    if (drawable_id == 0) {
        return NULL;
    }

    DrawableMap::const_iterator it;
    it = drawable_map.find(drawable_id);
    if (it == drawable_map.end()) {
        return (drawable_map[drawable_id] = ws->createDrawable(visual));
    }

    return it->second;
}
开发者ID:pzick,项目名称:apitrace,代码行数:14,代码来源:glretrace_glx.cpp

示例3: return

static glws::Drawable *
getDrawable(unsigned long long hdc) {
    if (hdc == 0) {
        return NULL;
    }

    DrawableMap::const_iterator it;
    it = drawable_map.find(hdc);
    if (it == drawable_map.end()) {
        return (drawable_map[hdc] = glretrace::createDrawable());
    }

    return it->second;
}
开发者ID:janesma,项目名称:apitrace,代码行数:14,代码来源:glretrace_wgl.cpp

示例4: return

static glws::Drawable *
getDrawable(unsigned long drawable_id, glprofile::Profile profile) {
    if (drawable_id == 0) {
        return NULL;
    }

    DrawableMap::const_iterator it;
    it = drawable_map.find(drawable_id);
    if (it == drawable_map.end()) {
        return (drawable_map[drawable_id] = glretrace::createDrawable(profile));
    }

    return it->second;
}
开发者ID:Dhanasekahar,项目名称:apitrace,代码行数:14,代码来源:glretrace_cgl.cpp

示例5: return

static glws::Drawable *
getDrawableFromContext(unsigned long long ctx) {
    if (ctx == 0) {
        return NULL;
    }

    DrawableMap::const_iterator it;
    it = context_drawable_map.find(ctx);
    if (it == context_drawable_map.end()) {
        return (context_drawable_map[ctx] = glretrace::createDrawable());
    }

    return it->second;
}
开发者ID:hramrach,项目名称:apitrace,代码行数:14,代码来源:glretrace_cgl.cpp

示例6: retrace_eglDestroySurface

static void retrace_eglDestroySurface(trace::Call &call) {
    unsigned long long orig_surface = call.arg(1).toUIntPtr();

    DrawableMap::iterator it;
    it = drawable_map.find(orig_surface);

    if (it != drawable_map.end()) {
        glretrace::Context *currentContext = glretrace::getCurrentContext();
        if (!currentContext || it->second != currentContext->drawable) {
            // TODO: reference count
            delete it->second;
        }
        drawable_map.erase(it);
    }
}
开发者ID:Dhanasekahar,项目名称:apitrace,代码行数:15,代码来源:glretrace_egl.cpp

示例7: return

static glws::Drawable *
getDrawable(unsigned long drawable_id) {
    if (drawable_id == 0) {
        return NULL;
    }

    /* XXX: Support multiple drawables. */
    drawable_id = 1;

    DrawableMap::const_iterator it;
    it = drawable_map.find(drawable_id);
    if (it == drawable_map.end()) {
        return (drawable_map[drawable_id] = glws::createDrawable(visual));
    }

    return it->second;
}
开发者ID:kanru,项目名称:apitrace,代码行数:17,代码来源:glretrace_cgl.cpp


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