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

Unified Diff: src/core/SkRecords.h

Issue 1181913003: add SkCanvas::drawAtlas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add virtuals for device and picture Created 5 years, 6 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
« src/core/SkRecorder.cpp ('K') | « src/core/SkRecorder.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRecords.h
diff --git a/src/core/SkRecords.h b/src/core/SkRecords.h
index 183c64776c7d77c9357e239b54215f96c458a055..a5e851fecf515f57c23fe07d1e9bc480ef574f70 100644
--- a/src/core/SkRecords.h
+++ b/src/core/SkRecords.h
@@ -12,6 +12,7 @@
#include "SkDrawable.h"
#include "SkPathPriv.h"
#include "SkPicture.h"
+#include "SkRSXform.h"
#include "SkTextBlob.h"
namespace SkRecords {
@@ -61,6 +62,7 @@ namespace SkRecords {
M(DrawRect) \
M(DrawSprite) \
M(DrawTextBlob) \
+ M(DrawAtlas) \
M(DrawVertices)
// Defines SkRecords::Type, an enum of all record types.
@@ -124,6 +126,15 @@ struct T { \
A a; B b; C c; D d; E e; \
};
+#define RECORD7(T, A, a, B, b, C, c, D, d, E, e, F, f, G, g) \
+struct T { \
+ static const Type kType = T##_Type; \
+ T() {} \
+ template <typename Z, typename Y, typename X, typename W, typename V, typename U, typename S> \
+ T(Z a, Y b, X c, W d, V e, U f, S g) : a(a), b(b), c(c), d(d), e(e), f(f), g(g) {} \
+ A a; B b; C c; D d; E e; F f; G g; \
+};
+
#define ACT_AS_PTR(ptr) \
operator T*() const { return ptr; } \
T* operator->() const { return ptr; }
@@ -322,6 +333,14 @@ RECORD5(DrawPatch, SkPaint, paint,
PODArray<SkPoint>, texCoords,
RefBox<SkXfermode>, xmode);
+RECORD7(DrawAtlas, Optional<SkPaint>, paint,
+ RefBox<const SkImage>, atlas,
+ PODArray<SkRSXform>, xforms,
+ PODArray<SkRect>, texs,
+ PODArray<SkColor>, colors,
+ int, count,
+ Optional<SkRect>, cull);
+
// This guy is so ugly we just write it manually.
struct DrawVertices {
static const Type kType = DrawVertices_Type;
« src/core/SkRecorder.cpp ('K') | « src/core/SkRecorder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698