Beispiel #1
0
 bool Lock(uint8_t** data, gfx::IntSize* size, int32_t* stride,
           gfx::SurfaceFormat* format)
 {
     bool success = mDT->LockBits(data, size, stride, format);
     if (success)
         mLockedBits = *data;
     return success;
 }
Beispiel #2
0
    bool Lock(uint8_t** data, gfx::IntSize* size, int32_t* stride,
              gfx::SurfaceFormat* format)
    {
        if (!mDT->LockBits(data, size, stride, format))
            return false;

        mLockedBits = *data;
        return true;
    }
Beispiel #3
0
 ~AutoLockBits() {
     if (mLockedBits)
         mDT->ReleaseBits(mLockedBits);
 }