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

Unified Diff: src/image/SkImage_Base.h

Issue 1372153006: SkImage doesn't use props, so don't need to store it (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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/SkImagePriv.h ('k') | src/image/SkImage_Generator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Base.h
diff --git a/src/image/SkImage_Base.h b/src/image/SkImage_Base.h
index 757262ad3dc30e0b6643e0b99de612461bf079e5..20df0bca2e168caf3436a6e11e1f4bbb8e0c34d2 100644
--- a/src/image/SkImage_Base.h
+++ b/src/image/SkImage_Base.h
@@ -20,26 +20,10 @@ enum {
class SkImage_Base : public SkImage {
public:
- SkImage_Base(int width, int height, uint32_t uniqueID, const SkSurfaceProps* props);
+ SkImage_Base(int width, int height, uint32_t uniqueID);
virtual ~SkImage_Base();
- /**
- * If the props weren't know at constructor time, call this but only before the image is
- * ever released into the wild (since the props field must appear to be immutable).
- */
- void initWithProps(const SkSurfaceProps& props) {
- SkASSERT(this->unique()); // only viewed by one thread
- SkSurfaceProps* mutableProps = const_cast<SkSurfaceProps*>(&fProps);
- SkASSERT(mutableProps != &props); // check for self-assignment
- mutableProps->~SkSurfaceProps();
- new (mutableProps) SkSurfaceProps(props);
- }
-
- const SkSurfaceProps& props() const { return fProps; }
-
- virtual const void* onPeekPixels(SkImageInfo*, size_t* /*rowBytes*/) const {
- return nullptr;
- }
+ virtual const void* onPeekPixels(SkImageInfo*, size_t* /*rowBytes*/) const { return nullptr; }
// Default impl calls onDraw
virtual bool onReadPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
@@ -69,8 +53,6 @@ public:
}
private:
- const SkSurfaceProps fProps;
-
// Set true by caches when they cache content that's derived from the current pixels.
mutable SkAtomic<bool> fAddedToCache;
« no previous file with comments | « src/image/SkImagePriv.h ('k') | src/image/SkImage_Generator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698