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

Unified Diff: sky/engine/core/painting/DrawLooperLayerInfo.h

Issue 1158883004: Add TransferMode to dart:sky, and use it instead of passing ints around. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: rebase Created 5 years, 7 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 | « sky/engine/core/painting/ColorFilter.idl ('k') | sky/engine/core/painting/DrawLooperLayerInfo.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/painting/DrawLooperLayerInfo.h
diff --git a/sky/engine/core/painting/DrawLooperLayerInfo.h b/sky/engine/core/painting/DrawLooperLayerInfo.h
index 2b7db091da44a9e62a1fea84cff612c01938de74..0c994559b2822b6b42e87634a1249679dcaa89d1 100644
--- a/sky/engine/core/painting/DrawLooperLayerInfo.h
+++ b/sky/engine/core/painting/DrawLooperLayerInfo.h
@@ -6,6 +6,8 @@
#define SKY_ENGINE_CORE_PAINTING_DRAWLOOPERLAYERINFO_H_
#include "dart/runtime/include/dart_api.h"
+#include "sky/engine/core/painting/Point.h"
+#include "sky/engine/core/painting/TransferMode.h"
#include "sky/engine/tonic/dart_wrappable.h"
#include "third_party/skia/include/effects/SkLayerDrawLooper.h"
@@ -22,10 +24,8 @@ class DrawLooperLayerInfo : public RefCounted<DrawLooperLayerInfo>,
~DrawLooperLayerInfo() override;
void setPaintBits(unsigned bits) { layer_info_.fPaintBits = bits; }
- void setColorMode(unsigned mode) {
- layer_info_.fColorMode = static_cast<SkXfermode::Mode>(mode);
- }
- void setOffset(float x, float y) { layer_info_.fOffset.set(x, y); }
+ void setColorMode(TransferMode m) { layer_info_.fColorMode = m.sk_mode; }
+ void setOffset(Point offset) { layer_info_.fOffset = offset.sk_point; }
void setPostTranslate(bool val) { layer_info_.fPostTranslate = val; }
const SkLayerDrawLooper::LayerInfo& layer_info() const { return layer_info_; }
« no previous file with comments | « sky/engine/core/painting/ColorFilter.idl ('k') | sky/engine/core/painting/DrawLooperLayerInfo.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698