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

Unified Diff: src/image/SkSurface_Base.h

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/SkImage_Raster.cpp ('k') | src/image/SkSurface_Gpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkSurface_Base.h
diff --git a/src/image/SkSurface_Base.h b/src/image/SkSurface_Base.h
index 7164c884e08344fdd081955c6486772c777a0764..8351bb87e60cdb045a2fdd6b6c283e7dab6db159 100644
--- a/src/image/SkSurface_Base.h
+++ b/src/image/SkSurface_Base.h
@@ -43,7 +43,7 @@ public:
* must faithfully represent the current contents, even if the surface
* is changed after this called (e.g. it is drawn to via its canvas).
*/
- virtual sk_sp<SkImage> onNewImageSnapshot(SkBudgeted, ForceCopyMode) = 0;
+ virtual sk_sp<SkImage> onNewImageSnapshot(SkBudgeted, SkCopyPixelsMode) = 0;
/**
* Default implementation:
@@ -122,9 +122,9 @@ sk_sp<SkImage> SkSurface_Base::refCachedImage(SkBudgeted budgeted, ForceUnique u
if (snap) {
return sk_ref_sp(snap);
}
- ForceCopyMode fcm = (kYes_ForceUnique == unique) ? kYes_ForceCopyMode :
- kNo_ForceCopyMode;
- snap = this->onNewImageSnapshot(budgeted, fcm).release();
+ SkCopyPixelsMode cpm = (kYes_ForceUnique == unique) ? kAlways_SkCopyPixelsMode :
+ kIfMutable_SkCopyPixelsMode;
+ snap = this->onNewImageSnapshot(budgeted, cpm).release();
if (kNo_ForceUnique == unique) {
SkASSERT(!fCachedImage);
fCachedImage = SkSafeRef(snap);
« no previous file with comments | « src/image/SkImage_Raster.cpp ('k') | src/image/SkSurface_Gpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698