diff options
author | reed <reed@google.com> | 2016-02-27 19:41:54 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-27 19:41:54 -0800 |
commit | fa82348a39a9cc348a0d4c627d3048b34bf716d4 (patch) | |
tree | ec749762f56d957fac6152efe75f16e417dec283 /include/views | |
parent | f3fb5d3fb8d6367f604ebb53161532cf8c32e56b (diff) |
remove unused view helpers
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1744043002
TBR=
Review URL: https://codereview.chromium.org/1744043002
Diffstat (limited to 'include/views')
-rw-r--r-- | include/views/SkBGViewArtist.h | 33 | ||||
-rw-r--r-- | include/views/SkParsePaint.h | 26 | ||||
-rw-r--r-- | include/views/SkViewInflate.h | 71 |
3 files changed, 0 insertions, 130 deletions
diff --git a/include/views/SkBGViewArtist.h b/include/views/SkBGViewArtist.h deleted file mode 100644 index 33054c8038..0000000000 --- a/include/views/SkBGViewArtist.h +++ /dev/null @@ -1,33 +0,0 @@ - -/* - * Copyright 2006 The Android Open Source Project - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - - -#ifndef SkBGViewArtist_DEFINED -#define SkBGViewArtist_DEFINED - -#include "SkView.h" -#include "SkPaint.h" - -class SkBGViewArtist : public SkView::Artist { -public: - SkBGViewArtist(SkColor c = SK_ColorWHITE); - virtual ~SkBGViewArtist(); - - const SkPaint& paint() const { return fPaint; } - SkPaint& paint() { return fPaint; } - -protected: - // overrides - virtual void onDraw(SkView*, SkCanvas*); - virtual void onInflate(const SkDOM&, const SkDOM::Node*); - -private: - SkPaint fPaint; -}; - -#endif diff --git a/include/views/SkParsePaint.h b/include/views/SkParsePaint.h deleted file mode 100644 index 066292f9c7..0000000000 --- a/include/views/SkParsePaint.h +++ /dev/null @@ -1,26 +0,0 @@ - -/* - * Copyright 2006 The Android Open Source Project - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - - -#ifndef SkParsePaint_DEFINED -#define SkParsePaint_DEFINED - -#include "SkPaint.h" -#include "SkDOM.h" - -/** "color" color - "opacity" scalar [0..1] - "stroke-width" scalar (0...inf) - "text-size" scalar (0..inf) - "is-stroke" bool - "is-antialias" bool - "is-lineartext" bool -*/ -void SkPaint_Inflate(SkPaint*, const SkDOM&, const SkDOM::Node*); - -#endif diff --git a/include/views/SkViewInflate.h b/include/views/SkViewInflate.h deleted file mode 100644 index 4ec36a67df..0000000000 --- a/include/views/SkViewInflate.h +++ /dev/null @@ -1,71 +0,0 @@ - -/* - * Copyright 2006 The Android Open Source Project - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - - -#ifndef SkViewInflate_DEFINED -#define SkViewInflate_DEFINED - -#include "SkDOM.h" -#include "../private/SkTDict.h" -#include "SkEvent.h" - -class SkView; - -class SkViewInflate { -public: - SkViewInflate(); - virtual ~SkViewInflate(); - - /** Return the tree of inflated views. If root is null, create the root element - as a view, otherwise assume root is that view, and just "inflate" it. - - Returns null if the tree cannot be built. - */ - SkView* inflate(const SkDOM& dom, const SkDOM::Node* node, SkView* root = NULL); - SkView* inflate(const char xml[], size_t len, SkView* root = NULL); - - /** Given an id attribute value, return the corresponding view, or null - if no match is found. - */ - SkView* findViewByID(const char id[]) const; - - SkDEBUGCODE(void dump() const;) - -protected: - /* Override this in your subclass to handle instantiating views - Call the inherited version for nodes you don't recognize. - - Do not call "inflate" on the view, just return it. This will - get called automatically after createView returns. - */ - virtual SkView* createView(const SkDOM& dom, const SkDOM::Node* node); - /** Base implementation calls view->inflate(dom, node). Subclasses may override this - to perform additional initializations to view, either before or after calling - the inherited version. - */ - virtual void inflateView(SkView* view, const SkDOM& dom, const SkDOM::Node* node); - -private: - enum { - kMinIDStrAlloc = 64 - }; - SkTDict<SkView*> fIDs; - - struct IDStr { - SkView* fView; - char* fStr; - }; - SkTDArray<IDStr> fListenTo, fBroadcastTo; - SkChunkAlloc fStrings; - - void addIDStr(SkTDArray<IDStr>* list, SkView*, const char* str); - - void rInflate(const SkDOM& dom, const SkDOM::Node* node, SkView* parent); -}; - -#endif |