SkBitmapController::State* SkBitmapController::requestBitmap(const SkBitmapProvider& provider,
                                                             const SkMatrix& inv,
                                                             SkFilterQuality quality,
                                                             void* storage, size_t storageSize) {
    State* state = this->onRequestBitmap(provider, inv, quality, storage, storageSize);
    if (state) {
        if (nullptr == state->fPixmap.addr()) {
            SkInPlaceDeleteCheck(state, storage);
            state = nullptr;
        }
    }
    return state;
}
Ejemplo n.º 2
0
SkBitmapController::State* SkBitmapController::requestBitmap(const SkBitmap& bm,
                                                             const SkMatrix& inv,
                                                             SkFilterQuality quality,
                                                             void* storage, size_t storageSize) {
    
    if (!valid_for_drawing(bm)) {
        return NULL;
    }

    State* state = this->onRequestBitmap(bm, inv, quality, storage, storageSize);
    if (state) {
        if (NULL == state->fPixmap.addr()) {
            SkInPlaceDeleteCheck(state, storage);
            state = NULL;
        }
    }
    return state;
}
Ejemplo n.º 3
0
SkBitmapProcState::~SkBitmapProcState() {
    SkInPlaceDeleteCheck(fBMState, fBMStateStorage.get());
}