예제 #1
0
파일: GnashImage.cpp 프로젝트: aopui/gnash
void
GnashImage::update(const GnashImage& from)
{
    assert(size() <= from.size());
    assert(width() == from.width());
    assert(_type == from._type);
    assert(_location == from._location);
    std::copy(from.begin(), from.begin() + size(), begin());
}
예제 #2
0
void GnashVaapiImage::update(const GnashImage& from)
{
    assert(stride() == from.stride());
    assert(size() <= from.size());
    assert(type() == from.type());

    switch (from.location()) {
    case GNASH_IMAGE_CPU:
        this->update(const_cast<boost::uint8_t *>(from.begin()));
        break;
    case GNASH_IMAGE_GPU:
        this->update(static_cast<const GnashVaapiImage &>(from).surface());
        break;
    default:
        assert(0);
        break;
    }
}