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

Unified Diff: src/image/SkSurface_Base.h

Issue 872543002: Take budgeted param when snapping new image. (Closed) Base URL: https://skia.googlesource.com/skia.git@budgeted
Patch Set: Address comment and rebase Created 5 years, 11 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.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 4da4cfb496866081daa7f343c1d649436a34c27c..30af9761d362c4de4216981df6298cf48405bc9c 100644
--- a/src/image/SkSurface_Base.h
+++ b/src/image/SkSurface_Base.h
@@ -32,9 +32,9 @@ public:
* Allocate an SkImage that represents the current contents of the surface.
* This needs to be able to outlive the surface itself (if need be), and
* must faithfully represent the current contents, even if the surface
- * is chaged after this calle (e.g. it is drawn to via its canvas).
+ * is changed after this called (e.g. it is drawn to via its canvas).
*/
- virtual SkImage* onNewImageSnapshot() = 0;
+ virtual SkImage* onNewImageSnapshot(Budgeted) = 0;
/**
* Default implementation:
@@ -61,7 +61,7 @@ public:
virtual void onCopyOnWrite(ContentChangeMode) = 0;
inline SkCanvas* getCachedCanvas();
- inline SkImage* getCachedImage();
+ inline SkImage* getCachedImage(Budgeted);
// called by SkSurface to compute a new genID
uint32_t newGenerationID();
@@ -87,9 +87,9 @@ SkCanvas* SkSurface_Base::getCachedCanvas() {
return fCachedCanvas;
}
-SkImage* SkSurface_Base::getCachedImage() {
+SkImage* SkSurface_Base::getCachedImage(Budgeted budgeted) {
if (NULL == fCachedImage) {
- fCachedImage = this->onNewImageSnapshot();
+ fCachedImage = this->onNewImageSnapshot(budgeted);
SkASSERT(!fCachedCanvas || fCachedCanvas->getSurfaceBase() == this);
}
return fCachedImage;
« no previous file with comments | « src/image/SkSurface.cpp ('k') | src/image/SkSurface_Gpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698