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

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

Issue 1144193006: Sky: Add a DrawLooper interface to the painting API to be used for shadows. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: setPaint 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SKY_ENGINE_CORE_PAINTING_DRAWLOOPERLAYERINFO_H_
6 #define SKY_ENGINE_CORE_PAINTING_DRAWLOOPERLAYERINFO_H_
7
8 #include "dart/runtime/include/dart_api.h"
9 #include "sky/engine/tonic/dart_wrappable.h"
10 #include "third_party/skia/include/effects/SkLayerDrawLooper.h"
11
12 namespace blink {
13
14 class DrawLooperLayerInfo : public RefCounted<DrawLooperLayerInfo>,
15 public DartWrappable {
16 DEFINE_WRAPPERTYPEINFO();
17 public:
18 static PassRefPtr<DrawLooperLayerInfo> create()
19 {
20 return adoptRef(new DrawLooperLayerInfo);
21 }
22 ~DrawLooperLayerInfo() override;
23
24 void setPaintBits(unsigned bits) { layer_info_.fPaintBits = bits; }
25 void setColorMode(unsigned mode) {
26 layer_info_.fColorMode = static_cast<SkXfermode::Mode>(mode);
27 }
28 void setOffset(float x, float y) { layer_info_.fOffset.set(x, y); }
29 void setPostTranslate(bool val) { layer_info_.fPostTranslate = val; }
30
31 const SkLayerDrawLooper::LayerInfo& layer_info() const { return layer_info_; }
32
33 private:
34 DrawLooperLayerInfo();
35
36 SkLayerDrawLooper::LayerInfo layer_info_;
37 };
38
39 } // namespace blink
40
41 #endif // SKY_ENGINE_CORE_PAINTING_DRAWLOOPERLAYERINFO_H_
OLDNEW
« no previous file with comments | « sky/engine/core/painting/DrawLooperAddLayerCallback.idl ('k') | sky/engine/core/painting/DrawLooperLayerInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698