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

Side by Side Diff: include/core/SkImageGenerator.h

Issue 495453004: remove SkPurgeGlobalDiscardableMemoryPool (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | src/lazy/SkDiscardableMemoryPool.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkImageGenerator_DEFINED 8 #ifndef SkImageGenerator_DEFINED
9 #define SkImageGenerator_DEFINED 9 #define SkImageGenerator_DEFINED
10 10
(...skipping 17 matching lines...) Expand all
28 * SkDELETE() on the generator. Therefore, generator should be 28 * SkDELETE() on the generator. Therefore, generator should be
29 * allocated with SkNEW() or SkNEW_ARGS(). 29 * allocated with SkNEW() or SkNEW_ARGS().
30 * 30 *
31 * @param destination Upon success, this bitmap will be 31 * @param destination Upon success, this bitmap will be
32 * configured and have a pixelref installed. 32 * configured and have a pixelref installed.
33 * 33 *
34 * @return true iff successful. 34 * @return true iff successful.
35 */ 35 */
36 SK_API bool SkInstallDiscardablePixelRef(SkImageGenerator*, SkBitmap* destinatio n); 36 SK_API bool SkInstallDiscardablePixelRef(SkImageGenerator*, SkBitmap* destinatio n);
37 37
38 /**
39 * Purges all unlocked discardable memory in Skia's global
40 * discardable memory pool.
41 */
42 SK_API void SkPurgeGlobalDiscardableMemoryPool();
43
44 38
45 /** 39 /**
46 * An interface that allows a purgeable PixelRef (such as a 40 * An interface that allows a purgeable PixelRef (such as a
47 * SkDiscardablePixelRef) to decode and re-decode an image as needed. 41 * SkDiscardablePixelRef) to decode and re-decode an image as needed.
48 */ 42 */
49 class SK_API SkImageGenerator { 43 class SK_API SkImageGenerator {
50 public: 44 public:
51 /** 45 /**
52 * The PixelRef which takes ownership of this SkImageGenerator 46 * The PixelRef which takes ownership of this SkImageGenerator
53 * will call the image generator's destructor. 47 * will call the image generator's destructor.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 protected: 126 protected:
133 virtual SkData* onRefEncodedData(); 127 virtual SkData* onRefEncodedData();
134 virtual bool onGetInfo(SkImageInfo* info); 128 virtual bool onGetInfo(SkImageInfo* info);
135 virtual bool onGetPixels(const SkImageInfo& info, 129 virtual bool onGetPixels(const SkImageInfo& info,
136 void* pixels, size_t rowBytes, 130 void* pixels, size_t rowBytes,
137 SkPMColor ctable[], int* ctableCount); 131 SkPMColor ctable[], int* ctableCount);
138 virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBy tes[3]); 132 virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBy tes[3]);
139 }; 133 };
140 134
141 #endif // SkImageGenerator_DEFINED 135 #endif // SkImageGenerator_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/lazy/SkDiscardableMemoryPool.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698