lockPixelsAreWritable is deprecated
BUG=skia:4328 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2177063002 TBR= Review-Url: https://codereview.chromium.org/2177063002
This commit is contained in:
parent
057ae8a15d
commit
b560b5c8c0
@ -455,6 +455,7 @@ public:
|
||||
* not be used as targets for a raster device/canvas (since all pixels
|
||||
* modifications will be lost when unlockPixels() is called.)
|
||||
*/
|
||||
// DEPRECATED
|
||||
bool lockPixelsAreWritable() const;
|
||||
|
||||
bool requestLock(SkAutoPixmapUnlock* result) const;
|
||||
|
@ -142,7 +142,7 @@ const SkBitmap& SkBitmapDevice::onAccessBitmap() {
|
||||
}
|
||||
|
||||
bool SkBitmapDevice::onAccessPixels(SkPixmap* pmap) {
|
||||
if (fBitmap.lockPixelsAreWritable() && this->onPeekPixels(pmap)) {
|
||||
if (this->onPeekPixels(pmap)) {
|
||||
fBitmap.notifyPixelsChanged();
|
||||
return true;
|
||||
}
|
||||
@ -185,16 +185,12 @@ bool SkBitmapDevice::onReadPixels(const SkImageInfo& dstInfo, void* dstPixels, s
|
||||
|
||||
void SkBitmapDevice::onAttachToCanvas(SkCanvas* canvas) {
|
||||
INHERITED::onAttachToCanvas(canvas);
|
||||
if (fBitmap.lockPixelsAreWritable()) {
|
||||
fBitmap.lockPixels();
|
||||
}
|
||||
fBitmap.lockPixels();
|
||||
}
|
||||
|
||||
void SkBitmapDevice::onDetachFromCanvas() {
|
||||
INHERITED::onDetachFromCanvas();
|
||||
if (fBitmap.lockPixelsAreWritable()) {
|
||||
fBitmap.unlockPixels();
|
||||
}
|
||||
fBitmap.unlockPixels();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -130,7 +130,6 @@ static void fill_src_texture(GrTexture* texture) {
|
||||
#endif
|
||||
|
||||
static void fill_dst_bmp_with_init_data(SkBitmap* bitmap) {
|
||||
SkASSERT(bitmap->lockPixelsAreWritable());
|
||||
SkAutoLockPixels alp(*bitmap);
|
||||
int w = bitmap->width();
|
||||
int h = bitmap->height();
|
||||
|
Loading…
Reference in New Issue
Block a user