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

Unified Diff: src/core/SkMipMap.h

Issue 1249543003: Creating functions for uploading a mipmapped texture. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: src/core/SkMipMap.h
diff --git a/src/core/SkMipMap.h b/src/core/SkMipMap.h
deleted file mode 100644
index e22c0a2181a9c0fcb41d8c857037570c6d8bc7d7..0000000000000000000000000000000000000000
--- a/src/core/SkMipMap.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2013 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkMipMap_DEFINED
-#define SkMipMap_DEFINED
-
-#include "SkCachedData.h"
-#include "SkScalar.h"
-
-class SkBitmap;
-class SkDiscardableMemory;
-
-typedef SkDiscardableMemory* (*SkDiscardableFactoryProc)(size_t bytes);
-
-class SkMipMap : public SkCachedData {
-public:
- static SkMipMap* Build(const SkBitmap& src, SkDiscardableFactoryProc);
-
- struct Level {
- void* fPixels;
- uint32_t fRowBytes;
- uint32_t fWidth, fHeight;
- float fScale; // < 1.0
- };
-
- bool extractLevel(SkScalar scale, Level*) const;
-
-protected:
- void onDataChange(void* oldData, void* newData) override {
- fLevels = (Level*)newData; // could be NULL
- }
-
-private:
- Level* fLevels;
- int fCount;
-
- // we take ownership of levels, and will free it with sk_free()
- SkMipMap(void* malloc, size_t size) : INHERITED(malloc, size) {}
- SkMipMap(size_t size, SkDiscardableMemory* dm) : INHERITED(size, dm) {}
-
- static size_t AllocLevelsSize(int levelCount, size_t pixelSize);
-
- typedef SkCachedData INHERITED;
-};
-
-#endif

Powered by Google App Engine
This is Rietveld 408576698