need _win.cc change from https://codereview.chromium.org/
124503002/ when this lands in chrome
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/
125063002
git-svn-id: http://skia.googlecode.com/svn/trunk@12907
2bbb7eff-a529-9590-31e7-
b0007b416f81
// only call from constructor. Flags this to always be locked, removing
// the need to grab the mutex and call onLockPixels/onUnlockPixels.
// Performance tweak to avoid those calls (esp. in multi-thread use case).
- void setPreLocked(void* pixels, SkColorTable* ctable);
+ void setPreLocked(void* pixels, size_t rowBytes, SkColorTable* ctable);
private:
SkBaseMutex* fMutex; // must remain in scope for the life of this object
fRB = rowBytes;
SkSafeRef(ctable);
- this->setPreLocked(fStorage, fCTable);
+ this->setPreLocked(fStorage, rowBytes, fCTable);
}
SkMallocPixelRef::SkMallocPixelRef(const SkImageInfo& info, void* storage,
fRB = rowBytes;
SkSafeRef(ctable);
- this->setPreLocked(fStorage, fCTable);
+ this->setPreLocked(fStorage, rowBytes, fCTable);
}
fCTable = NULL;
}
- this->setPreLocked(fStorage, fCTable);
+ this->setPreLocked(fStorage, fRB, fCTable);
}
that.fUniqueGenerationID = false;
}
-void SkPixelRef::setPreLocked(void* pixels, SkColorTable* ctable) {
+// rowBytes will be respected when we land the onNewLockPixels CL
+void SkPixelRef::setPreLocked(void* pixels, size_t rowBytes, SkColorTable* ctable) {
#ifndef SK_IGNORE_PIXELREF_SETPRELOCKED
// only call me in your constructor, otherwise fLockCount tracking can get
// out of sync.