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

Side by Side Diff: sky/engine/core/painting/DrawLooperLayerInfo.h

Issue 1162393002: Simplify TransferMode and Color types. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: format 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 unified diff | Download patch
« no previous file with comments | « sky/engine/core/painting/ColorFilter.cpp ('k') | sky/engine/core/painting/Paint.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SKY_ENGINE_CORE_PAINTING_DRAWLOOPERLAYERINFO_H_ 5 #ifndef SKY_ENGINE_CORE_PAINTING_DRAWLOOPERLAYERINFO_H_
6 #define SKY_ENGINE_CORE_PAINTING_DRAWLOOPERLAYERINFO_H_ 6 #define SKY_ENGINE_CORE_PAINTING_DRAWLOOPERLAYERINFO_H_
7 7
8 #include "dart/runtime/include/dart_api.h" 8 #include "dart/runtime/include/dart_api.h"
9 #include "sky/engine/core/painting/Point.h" 9 #include "sky/engine/core/painting/Point.h"
10 #include "sky/engine/core/painting/TransferMode.h" 10 #include "sky/engine/core/painting/TransferMode.h"
11 #include "sky/engine/tonic/dart_wrappable.h" 11 #include "sky/engine/tonic/dart_wrappable.h"
12 #include "third_party/skia/include/effects/SkLayerDrawLooper.h" 12 #include "third_party/skia/include/effects/SkLayerDrawLooper.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class DrawLooperLayerInfo : public RefCounted<DrawLooperLayerInfo>, 16 class DrawLooperLayerInfo : public RefCounted<DrawLooperLayerInfo>,
17 public DartWrappable { 17 public DartWrappable {
18 DEFINE_WRAPPERTYPEINFO(); 18 DEFINE_WRAPPERTYPEINFO();
19 public: 19 public:
20 static PassRefPtr<DrawLooperLayerInfo> create() 20 static PassRefPtr<DrawLooperLayerInfo> create()
21 { 21 {
22 return adoptRef(new DrawLooperLayerInfo); 22 return adoptRef(new DrawLooperLayerInfo);
23 } 23 }
24 ~DrawLooperLayerInfo() override; 24 ~DrawLooperLayerInfo() override;
25 25
26 void setPaintBits(unsigned bits) { layer_info_.fPaintBits = bits; } 26 void setPaintBits(unsigned bits) { layer_info_.fPaintBits = bits; }
27 void setColorMode(TransferMode m) { layer_info_.fColorMode = m.sk_mode; } 27 void setColorMode(SkXfermode::Mode mode) { layer_info_.fColorMode = mode; }
28 void setOffset(Point offset) { layer_info_.fOffset = offset.sk_point; } 28 void setOffset(Point offset) { layer_info_.fOffset = offset.sk_point; }
29 void setPostTranslate(bool val) { layer_info_.fPostTranslate = val; } 29 void setPostTranslate(bool val) { layer_info_.fPostTranslate = val; }
30 30
31 const SkLayerDrawLooper::LayerInfo& layer_info() const { return layer_info_; } 31 const SkLayerDrawLooper::LayerInfo& layer_info() const { return layer_info_; }
32 32
33 private: 33 private:
34 DrawLooperLayerInfo(); 34 DrawLooperLayerInfo();
35 35
36 SkLayerDrawLooper::LayerInfo layer_info_; 36 SkLayerDrawLooper::LayerInfo layer_info_;
37 }; 37 };
38 38
39 } // namespace blink 39 } // namespace blink
40 40
41 #endif // SKY_ENGINE_CORE_PAINTING_DRAWLOOPERLAYERINFO_H_ 41 #endif // SKY_ENGINE_CORE_PAINTING_DRAWLOOPERLAYERINFO_H_
OLDNEW
« no previous file with comments | « sky/engine/core/painting/ColorFilter.cpp ('k') | sky/engine/core/painting/Paint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698