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

Unified Diff: include/private/SkRecords.h

Issue 1261433009: Refugee from Dead Machine 11: Add SkCanvas::drawLitAtlas call Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 8 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 | « include/effects/SkPoint3.h ('k') | include/utils/SkDeferredCanvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/private/SkRecords.h
diff --git a/include/private/SkRecords.h b/include/private/SkRecords.h
index 1f2807842c4f76a3a42c7beff50bbbe0bca4cdbc..2586af30332a00ca13f7312ce09f511290d9f1a0 100644
--- a/include/private/SkRecords.h
+++ b/include/private/SkRecords.h
@@ -10,9 +10,11 @@
#include "SkCanvas.h"
#include "SkDrawable.h"
+#include "SkLight.h"
#include "SkMatrix.h"
#include "SkPath.h"
#include "SkPicture.h"
+#include "SkPoint3.h"
#include "SkRect.h"
#include "SkRRect.h"
#include "SkRSXform.h"
@@ -65,6 +67,7 @@ namespace SkRecords {
M(DrawSprite) \
M(DrawTextBlob) \
M(DrawAtlas) \
+ M(DrawLitAtlas) \
M(DrawVertices)
// Defines SkRecords::Type, an enum of all record types.
@@ -140,6 +143,20 @@ struct T { \
A a; B b; C c; D d; E e; F f; G g; H h; \
};
+#define RECORDB(T, A, a, B, b, C, c, D, d, E, e, F, f, G, g, H, h, I, i, J, j, K, k) \
+struct T { \
+ static const Type kType = T##_Type; \
+ T() {} \
+ template <typename Z, typename Y, typename X, typename W, \
+ typename V, typename U, typename S, typename R, \
+ typename Q, typename P, typename O> \
+ T(const Z& a, const Y& b, const X& c, const W& d, \
+ const V& e, const U& f, const S& g, const R& h, \
+ const Q& i, const P& j, const O& k) \
+ : a(a), b(b), c(c), d(d), e(e), f(f), g(g), h(h), i(i), j(j), k(k) {} \
+ A a; B b; C c; D d; E e; F f; G g; H h; I i; J j; K k; \
+};
+
#define ACT_AS_PTR(ptr) \
operator T*() const { return ptr; } \
T* operator->() const { return ptr; }
@@ -340,6 +357,18 @@ RECORD8(DrawAtlas, Optional<SkPaint>, paint,
SkXfermode::Mode, mode,
Optional<SkRect>, cull);
+RECORDB(DrawLitAtlas, Optional<SkPaint>, paint,
+ RefBox<const SkImage>, atlas,
+ PODArray<SkRSXform>, xforms,
+ PODArray<SkRect>, diffTexs,
+ PODArray<SkRect>, normTexs,
+ PODArray<SkColor>, colors,
+ int, count,
+ SkXfermode::Mode, mode,
+ Optional<SkRect>, cull,
+ PODArray<SkLight>, lights,
+ int, numLights);
+
// This guy is so ugly we just write it manually.
struct DrawVertices {
static const Type kType = DrawVertices_Type;
« no previous file with comments | « include/effects/SkPoint3.h ('k') | include/utils/SkDeferredCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698