| Romain Guy | 7fbcc04 | 2010-08-04 15:40:07 -0700 | [diff] [blame] | 1 | /* | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 2 | * Copyright (C) 2013 The Android Open Source Project | 
| Romain Guy | 7fbcc04 | 2010-08-04 15:40:07 -0700 | [diff] [blame] | 3 | * | 
|  | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); | 
|  | 5 | * you may not use this file except in compliance with the License. | 
|  | 6 | * You may obtain a copy of the License at | 
|  | 7 | * | 
|  | 8 | *      http://www.apache.org/licenses/LICENSE-2.0 | 
|  | 9 | * | 
|  | 10 | * Unless required by applicable law or agreed to in writing, software | 
|  | 11 | * distributed under the License is distributed on an "AS IS" BASIS, | 
|  | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
|  | 13 | * See the License for the specific language governing permissions and | 
|  | 14 | * limitations under the License. | 
|  | 15 | */ | 
|  | 16 |  | 
| Romain Guy | 5b3b352 | 2010-10-27 18:57:51 -0700 | [diff] [blame] | 17 | #ifndef ANDROID_HWUI_PATH_CACHE_H | 
|  | 18 | #define ANDROID_HWUI_PATH_CACHE_H | 
| Romain Guy | 7fbcc04 | 2010-08-04 15:40:07 -0700 | [diff] [blame] | 19 |  | 
| Chris Craik | 96a5c4c | 2015-01-27 15:46:35 -0800 | [diff] [blame] | 20 | #include "Debug.h" | 
|  | 21 | #include "Texture.h" | 
|  | 22 | #include "thread/Task.h" | 
|  | 23 | #include "thread/TaskProcessor.h" | 
|  | 24 | #include "utils/Macros.h" | 
|  | 25 | #include "utils/Pair.h" | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 26 |  | 
| Chris Craik | 96a5c4c | 2015-01-27 15:46:35 -0800 | [diff] [blame] | 27 | #include <GLES2/gl2.h> | 
|  | 28 | #include <SkPath.h> | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 29 | #include <utils/LruCache.h> | 
|  | 30 | #include <utils/Mutex.h> | 
| John Reck | 272a685 | 2015-07-29 16:48:58 -0700 | [diff] [blame] | 31 |  | 
|  | 32 | #include <vector> | 
| Romain Guy | fe48f65 | 2010-11-11 15:36:56 -0800 | [diff] [blame] | 33 |  | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 34 | class SkBitmap; | 
|  | 35 | class SkCanvas; | 
| Romain Guy | ca89e2a | 2013-03-08 17:44:20 -0800 | [diff] [blame] | 36 | class SkPaint; | 
| Chris Craik | 564acf7 | 2014-01-02 16:46:18 -0800 | [diff] [blame] | 37 | struct SkRect; | 
| Romain Guy | ff26a0c | 2011-01-20 11:35:46 -0800 | [diff] [blame] | 38 |  | 
| Romain Guy | 7fbcc04 | 2010-08-04 15:40:07 -0700 | [diff] [blame] | 39 | namespace android { | 
|  | 40 | namespace uirenderer { | 
|  | 41 |  | 
| Romain Guy | ca89e2a | 2013-03-08 17:44:20 -0800 | [diff] [blame] | 42 | class Caches; | 
|  | 43 |  | 
| Romain Guy | 9e10841 | 2010-11-09 14:35:20 -0800 | [diff] [blame] | 44 | /////////////////////////////////////////////////////////////////////////////// | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 45 | // Defines | 
|  | 46 | /////////////////////////////////////////////////////////////////////////////// | 
|  | 47 |  | 
|  | 48 | // Debug | 
|  | 49 | #if DEBUG_PATHS | 
|  | 50 | #define PATH_LOGD(...) ALOGD(__VA_ARGS__) | 
|  | 51 | #else | 
|  | 52 | #define PATH_LOGD(...) | 
|  | 53 | #endif | 
|  | 54 |  | 
|  | 55 | /////////////////////////////////////////////////////////////////////////////// | 
| Romain Guy | 9e10841 | 2010-11-09 14:35:20 -0800 | [diff] [blame] | 56 | // Classes | 
|  | 57 | /////////////////////////////////////////////////////////////////////////////// | 
|  | 58 |  | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 59 | /** | 
|  | 60 | * Alpha texture used to represent a path. | 
|  | 61 | */ | 
|  | 62 | struct PathTexture: public Texture { | 
| Chris Craik | e2bb380 | 2015-03-13 15:07:52 -0700 | [diff] [blame] | 63 | PathTexture(Caches& caches, float left, float top, | 
| John Reck | 38e0c32 | 2015-11-10 12:19:17 -0800 | [diff] [blame] | 64 | float offset, int generation) | 
| Chris Craik | e2bb380 | 2015-03-13 15:07:52 -0700 | [diff] [blame] | 65 | : Texture(caches) | 
|  | 66 | , left(left) | 
|  | 67 | , top(top) | 
|  | 68 | , offset(offset) { | 
| Chris Craik | e2bb380 | 2015-03-13 15:07:52 -0700 | [diff] [blame] | 69 | this->generation = generation; | 
|  | 70 | } | 
|  | 71 | PathTexture(Caches& caches, int generation) | 
|  | 72 | : Texture(caches) { | 
|  | 73 | this->generation = generation; | 
| Romain Guy | ff26a0c | 2011-01-20 11:35:46 -0800 | [diff] [blame] | 74 | } | 
|  | 75 |  | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 76 | ~PathTexture() { | 
|  | 77 | clearTask(); | 
| Romain Guy | 7fbcc04 | 2010-08-04 15:40:07 -0700 | [diff] [blame] | 78 | } | 
|  | 79 |  | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 80 | /** | 
|  | 81 | * Left coordinate of the path bounds. | 
|  | 82 | */ | 
| Chris Craik | e2bb380 | 2015-03-13 15:07:52 -0700 | [diff] [blame] | 83 | float left = 0; | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 84 | /** | 
|  | 85 | * Top coordinate of the path bounds. | 
|  | 86 | */ | 
| Chris Craik | e2bb380 | 2015-03-13 15:07:52 -0700 | [diff] [blame] | 87 | float top = 0; | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 88 | /** | 
|  | 89 | * Offset to draw the path at the correct origin. | 
|  | 90 | */ | 
| Chris Craik | e2bb380 | 2015-03-13 15:07:52 -0700 | [diff] [blame] | 91 | float offset = 0; | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 92 |  | 
|  | 93 | sp<Task<SkBitmap*> > task() const { | 
|  | 94 | return mTask; | 
| Romain Guy | 059e12c | 2012-11-28 17:35:51 -0800 | [diff] [blame] | 95 | } | 
|  | 96 |  | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 97 | void setTask(const sp<Task<SkBitmap*> >& task) { | 
|  | 98 | mTask = task; | 
| Romain Guy | 7fbcc04 | 2010-08-04 15:40:07 -0700 | [diff] [blame] | 99 | } | 
| Romain Guy | 7fbcc04 | 2010-08-04 15:40:07 -0700 | [diff] [blame] | 100 |  | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 101 | void clearTask() { | 
| Chris Craik | e84a208 | 2014-12-22 14:28:49 -0800 | [diff] [blame] | 102 | if (mTask != nullptr) { | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 103 | mTask.clear(); | 
|  | 104 | } | 
|  | 105 | } | 
| Romain Guy | b29cfbf | 2011-03-18 16:24:19 -0700 | [diff] [blame] | 106 |  | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 107 | private: | 
|  | 108 | sp<Task<SkBitmap*> > mTask; | 
|  | 109 | }; // struct PathTexture | 
| Romain Guy | 7fbcc04 | 2010-08-04 15:40:07 -0700 | [diff] [blame] | 110 |  | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 111 | enum ShapeType { | 
|  | 112 | kShapeNone, | 
|  | 113 | kShapeRect, | 
|  | 114 | kShapeRoundRect, | 
|  | 115 | kShapeCircle, | 
|  | 116 | kShapeOval, | 
|  | 117 | kShapeArc, | 
|  | 118 | kShapePath | 
|  | 119 | }; | 
|  | 120 |  | 
|  | 121 | struct PathDescription { | 
| Chris Craik | 05f3d6e | 2014-06-02 16:27:04 -0700 | [diff] [blame] | 122 | DESCRIPTION_TYPE(PathDescription); | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 123 | ShapeType type; | 
|  | 124 | SkPaint::Join join; | 
|  | 125 | SkPaint::Cap cap; | 
|  | 126 | SkPaint::Style style; | 
|  | 127 | float miter; | 
|  | 128 | float strokeWidth; | 
|  | 129 | SkPathEffect* pathEffect; | 
|  | 130 | union Shape { | 
|  | 131 | struct Path { | 
| Derek Sollenberger | ee24859 | 2015-02-12 14:10:21 -0500 | [diff] [blame] | 132 | uint32_t mGenerationID; | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 133 | } path; | 
|  | 134 | struct RoundRect { | 
|  | 135 | float mWidth; | 
|  | 136 | float mHeight; | 
|  | 137 | float mRx; | 
|  | 138 | float mRy; | 
|  | 139 | } roundRect; | 
|  | 140 | struct Circle { | 
|  | 141 | float mRadius; | 
|  | 142 | } circle; | 
|  | 143 | struct Oval { | 
|  | 144 | float mWidth; | 
|  | 145 | float mHeight; | 
|  | 146 | } oval; | 
|  | 147 | struct Rect { | 
|  | 148 | float mWidth; | 
|  | 149 | float mHeight; | 
|  | 150 | } rect; | 
|  | 151 | struct Arc { | 
|  | 152 | float mWidth; | 
|  | 153 | float mHeight; | 
|  | 154 | float mStartAngle; | 
|  | 155 | float mSweepAngle; | 
|  | 156 | bool mUseCenter; | 
|  | 157 | } arc; | 
|  | 158 | } shape; | 
|  | 159 |  | 
|  | 160 | PathDescription(); | 
| Chris Craik | d218a92 | 2014-01-02 17:13:34 -0800 | [diff] [blame] | 161 | PathDescription(ShapeType shapeType, const SkPaint* paint); | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 162 |  | 
|  | 163 | hash_t hash() const; | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 164 | }; | 
| Romain Guy | 059e12c | 2012-11-28 17:35:51 -0800 | [diff] [blame] | 165 |  | 
| Romain Guy | 7fbcc04 | 2010-08-04 15:40:07 -0700 | [diff] [blame] | 166 | /** | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 167 | * A simple LRU shape cache. The cache has a maximum size expressed in bytes. | 
| Romain Guy | 7fbcc04 | 2010-08-04 15:40:07 -0700 | [diff] [blame] | 168 | * Any texture added to the cache causing the cache to grow beyond the maximum | 
|  | 169 | * allowed size will also cause the oldest texture to be kicked out. | 
|  | 170 | */ | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 171 | class PathCache: public OnEntryRemoved<PathDescription, PathTexture*> { | 
| Romain Guy | 7fbcc04 | 2010-08-04 15:40:07 -0700 | [diff] [blame] | 172 | public: | 
| Romain Guy | fb8b763 | 2010-08-23 21:05:08 -0700 | [diff] [blame] | 173 | PathCache(); | 
| Romain Guy | ca89e2a | 2013-03-08 17:44:20 -0800 | [diff] [blame] | 174 | ~PathCache(); | 
| Romain Guy | 7fbcc04 | 2010-08-04 15:40:07 -0700 | [diff] [blame] | 175 |  | 
|  | 176 | /** | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 177 | * Used as a callback when an entry is removed from the cache. | 
|  | 178 | * Do not invoke directly. | 
| Romain Guy | 7fbcc04 | 2010-08-04 15:40:07 -0700 | [diff] [blame] | 179 | */ | 
| Chris Craik | e84a208 | 2014-12-22 14:28:49 -0800 | [diff] [blame] | 180 | void operator()(PathDescription& path, PathTexture*& texture) override; | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 181 |  | 
|  | 182 | /** | 
|  | 183 | * Clears the cache. This causes all textures to be deleted. | 
|  | 184 | */ | 
|  | 185 | void clear(); | 
|  | 186 |  | 
|  | 187 | /** | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 188 | * Returns the maximum size of the cache in bytes. | 
|  | 189 | */ | 
|  | 190 | uint32_t getMaxSize(); | 
|  | 191 | /** | 
|  | 192 | * Returns the current size of the cache in bytes. | 
|  | 193 | */ | 
|  | 194 | uint32_t getSize(); | 
|  | 195 |  | 
| Chris Craik | d218a92 | 2014-01-02 17:13:34 -0800 | [diff] [blame] | 196 | PathTexture* getRoundRect(float width, float height, float rx, float ry, const SkPaint* paint); | 
|  | 197 | PathTexture* getCircle(float radius, const SkPaint* paint); | 
|  | 198 | PathTexture* getOval(float width, float height, const SkPaint* paint); | 
|  | 199 | PathTexture* getRect(float width, float height, const SkPaint* paint); | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 200 | PathTexture* getArc(float width, float height, float startAngle, float sweepAngle, | 
| Chris Craik | d218a92 | 2014-01-02 17:13:34 -0800 | [diff] [blame] | 201 | bool useCenter, const SkPaint* paint); | 
|  | 202 | PathTexture* get(const SkPath* path, const SkPaint* paint); | 
| Digish Pandya | 2e4f67c | 2015-11-04 11:00:28 +0530 | [diff] [blame] | 203 | void         remove(const SkPath* path, const SkPaint* paint); | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 204 |  | 
| Romain Guy | 7fbcc04 | 2010-08-04 15:40:07 -0700 | [diff] [blame] | 205 | /** | 
| Romain Guy | fe48f65 | 2010-11-11 15:36:56 -0800 | [diff] [blame] | 206 | * Removes the specified path. This is meant to be called from threads | 
|  | 207 | * that are not the EGL context thread. | 
|  | 208 | */ | 
| Derek Sollenberger | ee24859 | 2015-02-12 14:10:21 -0500 | [diff] [blame] | 209 | ANDROID_API void removeDeferred(const SkPath* path); | 
| Romain Guy | fe48f65 | 2010-11-11 15:36:56 -0800 | [diff] [blame] | 210 | /** | 
|  | 211 | * Process deferred removals. | 
|  | 212 | */ | 
|  | 213 | void clearGarbage(); | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 214 | /** | 
|  | 215 | * Trims the contents of the cache, removing items until it's under its | 
|  | 216 | * specified limit. | 
|  | 217 | * | 
|  | 218 | * Trimming is used for caches that support pre-caching from a worker | 
|  | 219 | * thread. During pre-caching the maximum limit of the cache can be | 
|  | 220 | * exceeded for the duration of the frame. It is therefore required to | 
|  | 221 | * trim the cache at the end of the frame to keep the total amount of | 
|  | 222 | * memory used under control. | 
|  | 223 | */ | 
|  | 224 | void trim(); | 
| Romain Guy | 7fbcc04 | 2010-08-04 15:40:07 -0700 | [diff] [blame] | 225 |  | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 226 | /** | 
|  | 227 | * Precaches the specified path using background threads. | 
|  | 228 | */ | 
| Chris Craik | d218a92 | 2014-01-02 17:13:34 -0800 | [diff] [blame] | 229 | void precache(const SkPath* path, const SkPaint* paint); | 
| Romain Guy | ca89e2a | 2013-03-08 17:44:20 -0800 | [diff] [blame] | 230 |  | 
| Chris Craik | d218a92 | 2014-01-02 17:13:34 -0800 | [diff] [blame] | 231 | static bool canDrawAsConvexPath(SkPath* path, const SkPaint* paint); | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 232 | static void computePathBounds(const SkPath* path, const SkPaint* paint, | 
|  | 233 | float& left, float& top, float& offset, uint32_t& width, uint32_t& height); | 
|  | 234 | static void computeBounds(const SkRect& bounds, const SkPaint* paint, | 
|  | 235 | float& left, float& top, float& offset, uint32_t& width, uint32_t& height); | 
|  | 236 |  | 
| Romain Guy | 7fbcc04 | 2010-08-04 15:40:07 -0700 | [diff] [blame] | 237 | private: | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 238 | PathTexture* addTexture(const PathDescription& entry, | 
|  | 239 | const SkPath *path, const SkPaint* paint); | 
|  | 240 | PathTexture* addTexture(const PathDescription& entry, SkBitmap* bitmap); | 
| Romain Guy | 4500a8d | 2013-03-26 17:29:51 -0700 | [diff] [blame] | 241 |  | 
|  | 242 | /** | 
|  | 243 | * Generates the texture from a bitmap into the specified texture structure. | 
|  | 244 | */ | 
|  | 245 | void generateTexture(SkBitmap& bitmap, Texture* texture); | 
|  | 246 | void generateTexture(const PathDescription& entry, SkBitmap* bitmap, PathTexture* texture, | 
|  | 247 | bool addToCache = true); | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 248 |  | 
|  | 249 | PathTexture* get(const PathDescription& entry) { | 
|  | 250 | return mCache.get(entry); | 
|  | 251 | } | 
|  | 252 |  | 
|  | 253 | /** | 
|  | 254 | * Ensures there is enough space in the cache for a texture of the specified | 
|  | 255 | * dimensions. | 
|  | 256 | */ | 
|  | 257 | void purgeCache(uint32_t width, uint32_t height); | 
|  | 258 |  | 
|  | 259 | void removeTexture(PathTexture* texture); | 
|  | 260 |  | 
|  | 261 | bool checkTextureSize(uint32_t width, uint32_t height) { | 
|  | 262 | if (width > mMaxTextureSize || height > mMaxTextureSize) { | 
|  | 263 | ALOGW("Shape too large to be rendered into a texture (%dx%d, max=%dx%d)", | 
|  | 264 | width, height, mMaxTextureSize, mMaxTextureSize); | 
|  | 265 | return false; | 
|  | 266 | } | 
|  | 267 | return true; | 
|  | 268 | } | 
|  | 269 |  | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 270 | void init(); | 
|  | 271 |  | 
| Romain Guy | 5dc7fa7 | 2013-03-11 20:48:31 -0700 | [diff] [blame] | 272 | class PathTask: public Task<SkBitmap*> { | 
| Romain Guy | ca89e2a | 2013-03-08 17:44:20 -0800 | [diff] [blame] | 273 | public: | 
| Chris Craik | d218a92 | 2014-01-02 17:13:34 -0800 | [diff] [blame] | 274 | PathTask(const SkPath* path, const SkPaint* paint, PathTexture* texture): | 
| Chris Craik | 906d47f | 2014-06-27 18:30:23 -0700 | [diff] [blame] | 275 | path(*path), paint(*paint), texture(texture) { | 
| Romain Guy | 5dc7fa7 | 2013-03-11 20:48:31 -0700 | [diff] [blame] | 276 | } | 
| Romain Guy | ca89e2a | 2013-03-08 17:44:20 -0800 | [diff] [blame] | 277 |  | 
| Romain Guy | 5dc7fa7 | 2013-03-11 20:48:31 -0700 | [diff] [blame] | 278 | ~PathTask() { | 
|  | 279 | delete future()->get(); | 
|  | 280 | } | 
| Romain Guy | ca89e2a | 2013-03-08 17:44:20 -0800 | [diff] [blame] | 281 |  | 
| Derek Sollenberger | ee24859 | 2015-02-12 14:10:21 -0500 | [diff] [blame] | 282 | // copied, since input path not guaranteed to survive for duration of task | 
| Chris Craik | 906d47f | 2014-06-27 18:30:23 -0700 | [diff] [blame] | 283 | const SkPath path; | 
|  | 284 |  | 
|  | 285 | // copied, since input paint may not be immutable | 
| Kenny Root | 25e40de | 2014-05-30 11:51:20 -0700 | [diff] [blame] | 286 | const SkPaint paint; | 
| Romain Guy | 5dc7fa7 | 2013-03-11 20:48:31 -0700 | [diff] [blame] | 287 | PathTexture* texture; | 
| Romain Guy | ca89e2a | 2013-03-08 17:44:20 -0800 | [diff] [blame] | 288 | }; | 
|  | 289 |  | 
| Romain Guy | 5dc7fa7 | 2013-03-11 20:48:31 -0700 | [diff] [blame] | 290 | class PathProcessor: public TaskProcessor<SkBitmap*> { | 
|  | 291 | public: | 
|  | 292 | PathProcessor(Caches& caches); | 
|  | 293 | ~PathProcessor() { } | 
|  | 294 |  | 
| Chris Craik | e84a208 | 2014-12-22 14:28:49 -0800 | [diff] [blame] | 295 | virtual void onProcess(const sp<Task<SkBitmap*> >& task) override; | 
| Romain Guy | 5dc7fa7 | 2013-03-11 20:48:31 -0700 | [diff] [blame] | 296 |  | 
|  | 297 | private: | 
|  | 298 | uint32_t mMaxTextureSize; | 
|  | 299 | }; | 
|  | 300 |  | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 301 | LruCache<PathDescription, PathTexture*> mCache; | 
|  | 302 | uint32_t mSize; | 
| Chris Craik | 48a8f43 | 2016-02-05 15:59:29 -0800 | [diff] [blame] | 303 | const uint32_t mMaxSize; | 
| Romain Guy | c46d07a | 2013-03-15 19:06:39 -0700 | [diff] [blame] | 304 | GLuint mMaxTextureSize; | 
|  | 305 |  | 
|  | 306 | bool mDebugEnabled; | 
|  | 307 |  | 
| Romain Guy | 5dc7fa7 | 2013-03-11 20:48:31 -0700 | [diff] [blame] | 308 | sp<PathProcessor> mProcessor; | 
| Romain Guy | c5cbee7 | 2013-03-20 19:15:02 -0700 | [diff] [blame] | 309 |  | 
| John Reck | 272a685 | 2015-07-29 16:48:58 -0700 | [diff] [blame] | 310 | std::vector<uint32_t> mGarbage; | 
| Romain Guy | a2341a9 | 2010-09-08 18:04:33 -0700 | [diff] [blame] | 311 | mutable Mutex mLock; | 
| Romain Guy | 7fbcc04 | 2010-08-04 15:40:07 -0700 | [diff] [blame] | 312 | }; // class PathCache | 
|  | 313 |  | 
|  | 314 | }; // namespace uirenderer | 
|  | 315 | }; // namespace android | 
|  | 316 |  | 
| Romain Guy | 5b3b352 | 2010-10-27 18:57:51 -0700 | [diff] [blame] | 317 | #endif // ANDROID_HWUI_PATH_CACHE_H |