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

Unified Diff: src/core/SkBitmapProcShader.h

Issue 179343005: Add a class to allocate small objects w/o extra calls to new. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 10 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
Index: src/core/SkBitmapProcShader.h
diff --git a/src/core/SkBitmapProcShader.h b/src/core/SkBitmapProcShader.h
index b7e60f1ca1075e2413e791ced221e1b9de3b3110..36df525af8f9ecc6b469e0e9493f601cccc18b5f 100644
--- a/src/core/SkBitmapProcShader.h
+++ b/src/core/SkBitmapProcShader.h
@@ -12,6 +12,7 @@
#include "SkShader.h"
#include "SkBitmapProcState.h"
+#include "SkStackAllocator.h"
class SkBitmapProcShader : public SkShader {
public:
@@ -48,4 +49,11 @@ private:
typedef SkShader INHERITED;
};
+#define kBlitterStorageByteCount (sizeof(SkBitmapProcShader))
+
+// If alloc is non-NULL, it will be used to allocate the returned SkShader, and MUST outlive
+// the SkShader.
+SkShader* CreateBitmapShader(const SkBitmap& src, SkShader::TileMode, SkShader::TileMode,
+ SkStackAllocator<kBlitterStorageByteCount>* alloc);
+
#endif
« no previous file with comments | « include/core/SkShader.h ('k') | src/core/SkBitmapProcShader.cpp » ('j') | src/core/SkBlitter.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698