Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(654)

Unified Diff: src/image/SkSurface_Raster.cpp

Issue 2220603002: rename FoceCopyMode to SkCopyPixelMode (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: manual rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/image/SkSurface_Gpu.cpp ('k') | tests/ImageTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkSurface_Raster.cpp
diff --git a/src/image/SkSurface_Raster.cpp b/src/image/SkSurface_Raster.cpp
index c1be0b7fc5ec577ac8867e1727a1273e50bd38e4..90f26becb2327864f0173fc37b1f863f72314db9 100644
--- a/src/image/SkSurface_Raster.cpp
+++ b/src/image/SkSurface_Raster.cpp
@@ -24,7 +24,7 @@ public:
SkCanvas* onNewCanvas() override;
sk_sp<SkSurface> onNewSurface(const SkImageInfo&) override;
- sk_sp<SkImage> onNewImageSnapshot(SkBudgeted, ForceCopyMode) override;
+ sk_sp<SkImage> onNewImageSnapshot(SkBudgeted, SkCopyPixelsMode) override;
void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) override;
void onCopyOnWrite(ContentChangeMode) override;
void onRestoreBackingMutability() override;
@@ -118,7 +118,7 @@ void SkSurface_Raster::onDraw(SkCanvas* canvas, SkScalar x, SkScalar y,
canvas->drawBitmap(fBitmap, x, y, paint);
}
-sk_sp<SkImage> SkSurface_Raster::onNewImageSnapshot(SkBudgeted, ForceCopyMode forceCopyMode) {
+sk_sp<SkImage> SkSurface_Raster::onNewImageSnapshot(SkBudgeted, SkCopyPixelsMode cpm) {
if (fWeOwnThePixels) {
// SkImage_raster requires these pixels are immutable for its full lifetime.
// We'll undo this via onRestoreBackingMutability() if we can avoid the COW.
@@ -126,12 +126,12 @@ sk_sp<SkImage> SkSurface_Raster::onNewImageSnapshot(SkBudgeted, ForceCopyMode fo
pr->setTemporarilyImmutable();
}
} else {
- forceCopyMode = kYes_ForceCopyMode;
+ cpm = kAlways_SkCopyPixelsMode;
}
// Our pixels are in memory, so read access on the snapshot SkImage could be cheap.
// Lock the shared pixel ref to ensure peekPixels() is usable.
- return SkMakeImageFromRasterBitmap(fBitmap, forceCopyMode);
+ return SkMakeImageFromRasterBitmap(fBitmap, cpm);
}
void SkSurface_Raster::onRestoreBackingMutability() {
« no previous file with comments | « src/image/SkSurface_Gpu.cpp ('k') | tests/ImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698