gfx/skia/trunk/src/animator/SkPaintParts.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1
michael@0 2 /*
michael@0 3 * Copyright 2006 The Android Open Source Project
michael@0 4 *
michael@0 5 * Use of this source code is governed by a BSD-style license that can be
michael@0 6 * found in the LICENSE file.
michael@0 7 */
michael@0 8
michael@0 9
michael@0 10 #ifndef SkPaintParts_DEFINED
michael@0 11 #define SkPaintParts_DEFINED
michael@0 12
michael@0 13 #include "SkDisplayable.h"
michael@0 14 #include "SkMemberInfo.h"
michael@0 15 #include "SkPaint.h"
michael@0 16 #include "SkShader.h"
michael@0 17 #include "SkTypeface.h"
michael@0 18 #include "SkXfermode.h"
michael@0 19
michael@0 20 class SkDrawPaint;
michael@0 21 class SkDrawMatrix;
michael@0 22
michael@0 23 class SkPaintPart : public SkDisplayable {
michael@0 24 public:
michael@0 25 SkPaintPart();
michael@0 26 virtual bool add() = 0;
michael@0 27 virtual SkDisplayable* getParent() const;
michael@0 28 virtual bool setParent(SkDisplayable* parent);
michael@0 29 #ifdef SK_DEBUG
michael@0 30 virtual bool isPaintPart() const { return true; }
michael@0 31 #endif
michael@0 32 protected:
michael@0 33 SkDrawPaint* fPaint;
michael@0 34 };
michael@0 35
michael@0 36 class SkDrawMaskFilter : public SkPaintPart {
michael@0 37 DECLARE_EMPTY_MEMBER_INFO(MaskFilter);
michael@0 38 virtual SkMaskFilter* getMaskFilter();
michael@0 39 protected:
michael@0 40 virtual bool add();
michael@0 41 };
michael@0 42
michael@0 43 class SkDrawPathEffect : public SkPaintPart {
michael@0 44 DECLARE_EMPTY_MEMBER_INFO(PathEffect);
michael@0 45 virtual SkPathEffect* getPathEffect();
michael@0 46 protected:
michael@0 47 virtual bool add();
michael@0 48 };
michael@0 49
michael@0 50 class SkDrawShader : public SkPaintPart {
michael@0 51 DECLARE_DRAW_MEMBER_INFO(Shader);
michael@0 52 SkDrawShader();
michael@0 53 virtual SkShader* getShader();
michael@0 54 protected:
michael@0 55 virtual bool add();
michael@0 56 void addPostlude(SkShader* shader);
michael@0 57 SkDrawMatrix* matrix;
michael@0 58 int /*SkShader::TileMode*/ tileMode;
michael@0 59 };
michael@0 60
michael@0 61 class SkDrawTypeface : public SkPaintPart {
michael@0 62 DECLARE_DRAW_MEMBER_INFO(Typeface);
michael@0 63 SkDrawTypeface();
michael@0 64 #ifdef SK_DUMP_ENABLED
michael@0 65 virtual void dump(SkAnimateMaker *);
michael@0 66 #endif
michael@0 67 SkTypeface* getTypeface() {
michael@0 68 return SkTypeface::CreateFromName(fontName.c_str(), style); }
michael@0 69 protected:
michael@0 70 virtual bool add();
michael@0 71 SkString fontName;
michael@0 72 SkTypeface::Style style;
michael@0 73 };
michael@0 74
michael@0 75 #endif // SkPaintParts_DEFINED

mercurial