aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-07-22 07:49:50 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-22 20:47:37 +0000
commit9ddf86d52ae0afacd51e59db6177f8707a9bb535 (patch)
treeec93a8921e02048f2e96f4216780a8a9458d76db /include
parent54518ac1c2a447010ba17e8a734019471c25eeb9 (diff)
make SkColorTable private
Bug: skia: Change-Id: I7c00736192fe145653b171f021cff6dfc0fd34b4 Reviewed-on: https://skia-review.googlesource.com/25960 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/core/SkColorTable.h78
-rw-r--r--include/core/SkImage.h1
2 files changed, 0 insertions, 79 deletions
diff --git a/include/core/SkColorTable.h b/include/core/SkColorTable.h
deleted file mode 100644
index ca5efd1fe1..0000000000
--- a/include/core/SkColorTable.h
+++ /dev/null
@@ -1,78 +0,0 @@
-
-/*
- * Copyright 2012 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-
-#ifndef SkColorTable_DEFINED
-#define SkColorTable_DEFINED
-
-#include "../private/SkOnce.h"
-#include "SkColor.h"
-#include "SkFlattenable.h"
-#include "SkImageInfo.h"
-
-/** \class SkColorTable
-
- SkColorTable holds an array SkPMColors (premultiplied 32-bit colors) used by
- 8-bit bitmaps, where the bitmap bytes are interpreted as indices into the colortable.
-
- SkColorTable is thread-safe.
-*/
-class SK_API SkColorTable : public SkRefCnt {
-public:
- static sk_sp<SkColorTable> Make(const SkPMColor colors[], int count);
-
- /** Copy up to 256 colors into a new SkColorTable.
- */
- SkColorTable(const SkPMColor colors[], int count);
- ~SkColorTable() override;
-
- /** Returns the number of colors in the table.
- */
- int count() const { return fCount; }
-
- /** Returns the specified color from the table. In the debug build, this asserts that
- * the index is in range (0 <= index < count).
- */
- SkPMColor operator[](int index) const {
- SkASSERT(fColors != NULL && (unsigned)index < (unsigned)fCount);
- return fColors[index];
- }
-
- /** Return the array of colors for reading.
- */
- const SkPMColor* readColors() const { return fColors; }
-
- /** read16BitCache() returns the array of RGB16 colors that mirror the 32bit colors.
- */
- const uint16_t* read16BitCache() const;
-
- void writeToBuffer(SkWriteBuffer&) const;
-
- // may return null
- static sk_sp<SkColorTable> Create(SkReadBuffer&);
-
-private:
- enum AllocatedWithMalloc {
- kAllocatedWithMalloc
- };
- // assumes ownership of colors (assumes it was allocated w/ malloc)
- SkColorTable(SkPMColor* colors, int count, AllocatedWithMalloc);
-
- SkPMColor* fColors;
- mutable uint16_t* f16BitCache = nullptr;
- mutable SkOnce f16BitCacheOnce;
- int fCount;
-
- void init(const SkPMColor* colors, int count);
-
- friend class SkImageGenerator;
-
- typedef SkRefCnt INHERITED;
-};
-
-#endif
diff --git a/include/core/SkImage.h b/include/core/SkImage.h
index 2a423c0814..9e82be1bfa 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -17,7 +17,6 @@
class SkData;
class SkCanvas;
-class SkColorTable;
class SkImageGenerator;
class SkPaint;
class SkPicture;