blob: d233150d4a349404967b946a7bf13f621f4cde8a [file] [log] [blame]
Romain Guy4aa90572010-09-26 18:40:37 -07001/*
2 * Copyright (C) 2010 The Android Open Source Project
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 Guy5b3b3522010-10-27 18:57:51 -070017#ifndef ANDROID_HWUI_DISPLAY_LIST_RENDERER_H
18#define ANDROID_HWUI_DISPLAY_LIST_RENDERER_H
Romain Guy4aa90572010-09-26 18:40:37 -070019
Romain Guy4aa90572010-09-26 18:40:37 -070020#include <SkMatrix.h>
21#include <SkPaint.h>
22#include <SkPath.h>
Romain Guy79537452011-10-12 13:48:51 -070023#include <cutils/compiler.h>
24
Chris Craik0776a602013-02-14 15:36:01 -080025#include "DisplayList.h"
Chet Haase9c1e23b2011-03-24 10:51:31 -070026#include "DisplayListLogBuffer.h"
Romain Guy4aa90572010-09-26 18:40:37 -070027#include "OpenGLRenderer.h"
28
29namespace android {
30namespace uirenderer {
31
32///////////////////////////////////////////////////////////////////////////////
33// Defines
34///////////////////////////////////////////////////////////////////////////////
35
Romain Guy6d7475d2011-07-27 16:28:21 -070036#define MIN_WRITER_SIZE 4096
Romain Guy33f6beb2012-02-16 19:24:51 -080037#define OP_MAY_BE_SKIPPED_MASK 0xff000000
Romain Guy4aa90572010-09-26 18:40:37 -070038
Romain Guyffac7fc2011-01-13 17:21:49 -080039// Debug
40#if DEBUG_DISPLAY_LIST
Steve Block5baa3a62011-12-20 16:23:08 +000041 #define DISPLAY_LIST_LOGD(...) ALOGD(__VA_ARGS__)
Romain Guyffac7fc2011-01-13 17:21:49 -080042#else
43 #define DISPLAY_LIST_LOGD(...)
44#endif
45
Romain Guy4aa90572010-09-26 18:40:37 -070046///////////////////////////////////////////////////////////////////////////////
Romain Guyb051e892010-09-28 19:09:36 -070047// Display list
Romain Guy4aa90572010-09-26 18:40:37 -070048///////////////////////////////////////////////////////////////////////////////
49
Chris Craikc3566d02013-02-04 16:16:33 -080050class DeferredDisplayList;
Romain Guyb051e892010-09-28 19:09:36 -070051class DisplayListRenderer;
Chris Craik2af46352012-11-26 18:30:17 -080052class DisplayListOp;
53class DrawOp;
54class StateOp;
55
Romain Guyb051e892010-09-28 19:09:36 -070056/**
57 * Records drawing commands in a display list for latter playback.
58 */
59class DisplayListRenderer: public OpenGLRenderer {
60public:
Romain Guy79537452011-10-12 13:48:51 -070061 ANDROID_API DisplayListRenderer();
62 virtual ~DisplayListRenderer();
Romain Guyb051e892010-09-28 19:09:36 -070063
Romain Guy79537452011-10-12 13:48:51 -070064 ANDROID_API DisplayList* getDisplayList(DisplayList* displayList);
Chet Haase5977baa2011-01-05 18:01:22 -080065
Romain Guy49c5fc02012-05-15 11:10:01 -070066 virtual bool isDeferred();
67
Romain Guy79537452011-10-12 13:48:51 -070068 virtual void setViewport(int width, int height);
Romain Guy7c25aab2012-10-18 15:05:02 -070069 virtual status_t prepareDirty(float left, float top, float right, float bottom, bool opaque);
Romain Guy79537452011-10-12 13:48:51 -070070 virtual void finish();
Romain Guyb051e892010-09-28 19:09:36 -070071
Romain Guy65549432012-03-26 16:45:05 -070072 virtual status_t callDrawGLFunction(Functor *functor, Rect& dirty);
Romain Guy4aa90572010-09-26 18:40:37 -070073
Romain Guy79537452011-10-12 13:48:51 -070074 virtual void interrupt();
75 virtual void resume();
Chet Haasedaf98e92011-01-10 14:10:36 -080076
Romain Guy79537452011-10-12 13:48:51 -070077 virtual int save(int flags);
78 virtual void restore();
79 virtual void restoreToCount(int saveCount);
Romain Guy4aa90572010-09-26 18:40:37 -070080
Romain Guy79537452011-10-12 13:48:51 -070081 virtual int saveLayer(float left, float top, float right, float bottom,
Chris Craikff785832013-03-08 13:12:16 -080082 int alpha, SkXfermode::Mode mode, int flags);
Romain Guy4aa90572010-09-26 18:40:37 -070083
Romain Guy79537452011-10-12 13:48:51 -070084 virtual void translate(float dx, float dy);
85 virtual void rotate(float degrees);
86 virtual void scale(float sx, float sy);
87 virtual void skew(float sx, float sy);
Romain Guy4aa90572010-09-26 18:40:37 -070088
Romain Guy79537452011-10-12 13:48:51 -070089 virtual void setMatrix(SkMatrix* matrix);
90 virtual void concatMatrix(SkMatrix* matrix);
Romain Guy4aa90572010-09-26 18:40:37 -070091
Romain Guy79537452011-10-12 13:48:51 -070092 virtual bool clipRect(float left, float top, float right, float bottom, SkRegion::Op op);
Romain Guy735738c2012-12-03 12:34:51 -080093 virtual bool clipPath(SkPath* path, SkRegion::Op op);
94 virtual bool clipRegion(SkRegion* region, SkRegion::Op op);
Romain Guy4aa90572010-09-26 18:40:37 -070095
Chris Craikc3566d02013-02-04 16:16:33 -080096 virtual status_t drawDisplayList(DisplayList* displayList, Rect& dirty, int32_t flags);
Chris Craika08f95c2013-03-15 17:24:33 -070097 virtual status_t drawLayer(Layer* layer, float x, float y);
Chet Haase48659092012-05-31 15:21:51 -070098 virtual status_t drawBitmap(SkBitmap* bitmap, float left, float top, SkPaint* paint);
99 virtual status_t drawBitmap(SkBitmap* bitmap, SkMatrix* matrix, SkPaint* paint);
100 virtual status_t drawBitmap(SkBitmap* bitmap, float srcLeft, float srcTop,
Romain Guy4aa90572010-09-26 18:40:37 -0700101 float srcRight, float srcBottom, float dstLeft, float dstTop,
Chet Haase5c13d892010-10-08 08:37:55 -0700102 float dstRight, float dstBottom, SkPaint* paint);
Chet Haase48659092012-05-31 15:21:51 -0700103 virtual status_t drawBitmapData(SkBitmap* bitmap, float left, float top, SkPaint* paint);
104 virtual status_t drawBitmapMesh(SkBitmap* bitmap, int meshWidth, int meshHeight,
Romain Guy5a7b4662011-01-20 19:09:30 -0800105 float* vertices, int* colors, SkPaint* paint);
Romain Guy3b748a42013-04-17 18:54:38 -0700106 virtual status_t drawPatch(SkBitmap* bitmap, Res_png_9patch* patch,
Chet Haase5c13d892010-10-08 08:37:55 -0700107 float left, float top, float right, float bottom, SkPaint* paint);
Chet Haase48659092012-05-31 15:21:51 -0700108 virtual status_t drawColor(int color, SkXfermode::Mode mode);
109 virtual status_t drawRect(float left, float top, float right, float bottom, SkPaint* paint);
110 virtual status_t drawRoundRect(float left, float top, float right, float bottom,
Romain Guy01d58e42011-01-19 21:54:02 -0800111 float rx, float ry, SkPaint* paint);
Chet Haase48659092012-05-31 15:21:51 -0700112 virtual status_t drawCircle(float x, float y, float radius, SkPaint* paint);
113 virtual status_t drawOval(float left, float top, float right, float bottom, SkPaint* paint);
114 virtual status_t drawArc(float left, float top, float right, float bottom,
Romain Guy8b2f5262011-01-23 16:15:02 -0800115 float startAngle, float sweepAngle, bool useCenter, SkPaint* paint);
Chet Haase48659092012-05-31 15:21:51 -0700116 virtual status_t drawPath(SkPath* path, SkPaint* paint);
117 virtual status_t drawLines(float* points, int count, SkPaint* paint);
118 virtual status_t drawPoints(float* points, int count, SkPaint* paint);
Chet Haase48659092012-05-31 15:21:51 -0700119 virtual status_t drawTextOnPath(const char* text, int bytesCount, int count, SkPath* path,
Romain Guy325740f2012-02-24 16:48:34 -0800120 float hOffset, float vOffset, SkPaint* paint);
Chet Haase48659092012-05-31 15:21:51 -0700121 virtual status_t drawPosText(const char* text, int bytesCount, int count,
122 const float* positions, SkPaint* paint);
Chris Craik527a3aa2013-03-04 10:19:31 -0800123 virtual status_t drawText(const char* text, int bytesCount, int count, float x, float y,
Chris Craik41541822013-05-03 16:35:54 -0700124 const float* positions, SkPaint* paint, float totalAdvance, const Rect& bounds,
125 DrawOpMode drawOpMode);
Chris Craik527a3aa2013-03-04 10:19:31 -0800126
Romain Guy672433d2013-01-04 19:05:13 -0800127 virtual status_t drawRects(const float* rects, int count, SkPaint* paint);
Romain Guy4aa90572010-09-26 18:40:37 -0700128
Romain Guy79537452011-10-12 13:48:51 -0700129 virtual void resetShader();
130 virtual void setupShader(SkiaShader* shader);
Romain Guy4aa90572010-09-26 18:40:37 -0700131
Romain Guy79537452011-10-12 13:48:51 -0700132 virtual void resetColorFilter();
133 virtual void setupColorFilter(SkiaColorFilter* filter);
Romain Guy4aa90572010-09-26 18:40:37 -0700134
Romain Guy79537452011-10-12 13:48:51 -0700135 virtual void resetShadow();
136 virtual void setupShadow(float radius, float dx, float dy, int color);
Romain Guy4aa90572010-09-26 18:40:37 -0700137
Romain Guy5ff9df62012-01-23 17:09:05 -0800138 virtual void resetPaintFilter();
139 virtual void setupPaintFilter(int clearBits, int setBits);
140
Romain Guy79537452011-10-12 13:48:51 -0700141 ANDROID_API void reset();
Romain Guy4aa90572010-09-26 18:40:37 -0700142
Chris Craik2af46352012-11-26 18:30:17 -0800143 sp<DisplayListData> getDisplayListData() const {
144 return mDisplayListData;
Romain Guyb051e892010-09-28 19:09:36 -0700145 }
146
Chet Haase5c13d892010-10-08 08:37:55 -0700147 const Vector<SkBitmap*>& getBitmapResources() const {
148 return mBitmapResources;
Romain Guyb051e892010-09-28 19:09:36 -0700149 }
150
Romain Guy49c5fc02012-05-15 11:10:01 -0700151 const Vector<SkBitmap*>& getOwnedBitmapResources() const {
152 return mOwnedBitmapResources;
153 }
154
Romain Guyd586ad92011-06-22 16:14:36 -0700155 const Vector<SkiaColorFilter*>& getFilterResources() const {
156 return mFilterResources;
157 }
158
Romain Guye3b0a012013-06-26 15:45:41 -0700159 const Vector<Res_png_9patch*>& getPatchResources() const {
160 return mPatchResources;
161 }
162
Romain Guy24c00212011-01-14 15:31:00 -0800163 const Vector<SkiaShader*>& getShaders() const {
164 return mShaders;
Romain Guyb051e892010-09-28 19:09:36 -0700165 }
166
Chet Haased98aa2d2010-10-25 15:47:32 -0700167 const Vector<SkPaint*>& getPaints() const {
168 return mPaints;
169 }
170
Romain Guy2fc941e2011-02-03 15:06:05 -0800171 const Vector<SkPath*>& getPaths() const {
172 return mPaths;
173 }
174
Chet Haased34dd712012-05-02 18:50:34 -0700175 const SortedVector<SkPath*>& getSourcePaths() const {
176 return mSourcePaths;
177 }
178
Romain Guy735738c2012-12-03 12:34:51 -0800179 const Vector<SkRegion*>& getRegions() const {
180 return mRegions;
181 }
182
Chet Haase603f6de2012-09-14 15:31:25 -0700183 const Vector<Layer*>& getLayers() const {
184 return mLayers;
185 }
186
Chet Haased98aa2d2010-10-25 15:47:32 -0700187 const Vector<SkMatrix*>& getMatrices() const {
188 return mMatrices;
189 }
190
Romain Guy54c1a642012-09-27 17:55:46 -0700191 uint32_t getFunctorCount() const {
192 return mFunctorCount;
193 }
194
Romain Guy4aa90572010-09-26 18:40:37 -0700195private:
Chris Craik2af46352012-11-26 18:30:17 -0800196 void insertRestoreToCount();
197 void insertTranslate();
Romain Guy27454a42011-01-23 12:01:41 -0800198
Chris Craik2af46352012-11-26 18:30:17 -0800199 LinearAllocator& alloc() { return mDisplayListData->allocator; }
200 void addStateOp(StateOp* op);
Romain Guy0f667532013-03-01 14:31:04 -0800201 void addDrawOp(DrawOp* op);
Chris Craik2af46352012-11-26 18:30:17 -0800202 void addOpInternal(DisplayListOp* op) {
Romain Guy27454a42011-01-23 12:01:41 -0800203 insertRestoreToCount();
Chris Craik2af46352012-11-26 18:30:17 -0800204 insertTranslate();
205 mDisplayListData->displayListOps.add(op);
Romain Guy4aa90572010-09-26 18:40:37 -0700206 }
207
Chris Craik2af46352012-11-26 18:30:17 -0800208 template<class T>
209 inline T* refBuffer(const T* srcBuffer, int32_t count) {
210 if (srcBuffer == NULL) return NULL;
211 T* dstBuffer = (T*) mDisplayListData->allocator.alloc(count * sizeof(T));
212 memcpy(dstBuffer, srcBuffer, count * sizeof(T));
213 return dstBuffer;
Romain Guy33f6beb2012-02-16 19:24:51 -0800214 }
215
Chris Craik2af46352012-11-26 18:30:17 -0800216 inline char* refText(const char* text, size_t byteLength) {
217 return (char*) refBuffer<uint8_t>((uint8_t*)text, byteLength);
Romain Guy33f6beb2012-02-16 19:24:51 -0800218 }
219
Chris Craik2af46352012-11-26 18:30:17 -0800220 inline SkPath* refPath(SkPath* path) {
221 if (!path) return NULL;
Romain Guy2fc941e2011-02-03 15:06:05 -0800222
223 SkPath* pathCopy = mPathMap.valueFor(path);
224 if (pathCopy == NULL || pathCopy->getGenerationID() != path->getGenerationID()) {
Romain Guyb29cfbf2011-03-18 16:24:19 -0700225 pathCopy = new SkPath(*path);
Romain Guy4bcb7462012-02-23 17:08:38 -0800226 pathCopy->setSourcePath(path);
Romain Guy96ebc6b2012-02-21 18:32:32 -0800227 // replaceValueFor() performs an add if the entry doesn't exist
228 mPathMap.replaceValueFor(path, pathCopy);
Romain Guyb29cfbf2011-03-18 16:24:19 -0700229 mPaths.add(pathCopy);
Romain Guy2fc941e2011-02-03 15:06:05 -0800230 }
Chet Haased34dd712012-05-02 18:50:34 -0700231 if (mSourcePaths.indexOf(path) < 0) {
Romain Guy58ecc202012-09-07 11:58:36 -0700232 mCaches.resourceCache.incrementRefcount(path);
Chet Haased34dd712012-05-02 18:50:34 -0700233 mSourcePaths.add(path);
234 }
Chris Craik2af46352012-11-26 18:30:17 -0800235 return pathCopy;
Romain Guy4aa90572010-09-26 18:40:37 -0700236 }
237
Chris Craik2af46352012-11-26 18:30:17 -0800238 inline SkPaint* refPaint(SkPaint* paint) {
Romain Guy24c00212011-01-14 15:31:00 -0800239 if (!paint) {
Chet Haasee816bae2012-08-09 13:39:02 -0700240 return paint;
Chet Haased98aa2d2010-10-25 15:47:32 -0700241 }
Romain Guy0fe478e2010-11-08 12:08:41 -0800242
Romain Guy22d41842012-01-19 18:33:25 -0800243 SkPaint* paintCopy = mPaintMap.valueFor(paint);
Chet Haased98aa2d2010-10-25 15:47:32 -0700244 if (paintCopy == NULL || paintCopy->getGenerationID() != paint->getGenerationID()) {
245 paintCopy = new SkPaint(*paint);
Romain Guy96ebc6b2012-02-21 18:32:32 -0800246 // replaceValueFor() performs an add if the entry doesn't exist
247 mPaintMap.replaceValueFor(paint, paintCopy);
Chet Haased98aa2d2010-10-25 15:47:32 -0700248 mPaints.add(paintCopy);
249 }
Romain Guy0fe478e2010-11-08 12:08:41 -0800250
Chet Haasee816bae2012-08-09 13:39:02 -0700251 return paintCopy;
Romain Guy0fe478e2010-11-08 12:08:41 -0800252 }
253
Chris Craik2af46352012-11-26 18:30:17 -0800254 inline SkRegion* refRegion(SkRegion* region) {
Romain Guy735738c2012-12-03 12:34:51 -0800255 if (!region) {
Romain Guy735738c2012-12-03 12:34:51 -0800256 return region;
257 }
258
259 SkRegion* regionCopy = mRegionMap.valueFor(region);
260 // TODO: Add generation ID to SkRegion
261 if (regionCopy == NULL) {
262 regionCopy = new SkRegion(*region);
263 // replaceValueFor() performs an add if the entry doesn't exist
264 mRegionMap.replaceValueFor(region, regionCopy);
265 mRegions.add(regionCopy);
266 }
267
Romain Guy735738c2012-12-03 12:34:51 -0800268 return regionCopy;
269 }
270
Chris Craik2af46352012-11-26 18:30:17 -0800271 inline SkMatrix* refMatrix(SkMatrix* matrix) {
Romain Guy4e7b7722013-07-16 13:47:01 -0700272 if (matrix) {
273 // Copying the matrix is cheap and prevents against the user changing
274 // the original matrix before the operation that uses it
275 SkMatrix* copy = new SkMatrix(*matrix);
276 mMatrices.add(copy);
277 return copy;
278 }
279 return matrix;
Romain Guy4aa90572010-09-26 18:40:37 -0700280 }
281
Romain Guyce4a7df2013-03-28 11:32:33 -0700282 inline Layer* refLayer(Layer* layer) {
283 mLayers.add(layer);
284 mCaches.resourceCache.incrementRefcount(layer);
285 return layer;
286 }
287
Chris Craik2af46352012-11-26 18:30:17 -0800288 inline SkBitmap* refBitmap(SkBitmap* bitmap) {
Chet Haased98aa2d2010-10-25 15:47:32 -0700289 // Note that this assumes the bitmap is immutable. There are cases this won't handle
290 // correctly, such as creating the bitmap from scratch, drawing with it, changing its
291 // contents, and drawing again. The only fix would be to always copy it the first time,
292 // which doesn't seem worth the extra cycles for this unlikely case.
Chet Haase5c13d892010-10-08 08:37:55 -0700293 mBitmapResources.add(bitmap);
Romain Guy58ecc202012-09-07 11:58:36 -0700294 mCaches.resourceCache.incrementRefcount(bitmap);
Chris Craik2af46352012-11-26 18:30:17 -0800295 return bitmap;
Chet Haase5c13d892010-10-08 08:37:55 -0700296 }
Romain Guy4aa90572010-09-26 18:40:37 -0700297
Chris Craik2af46352012-11-26 18:30:17 -0800298 inline SkBitmap* refBitmapData(SkBitmap* bitmap) {
Romain Guy49c5fc02012-05-15 11:10:01 -0700299 mOwnedBitmapResources.add(bitmap);
Romain Guy58ecc202012-09-07 11:58:36 -0700300 mCaches.resourceCache.incrementRefcount(bitmap);
Chris Craik2af46352012-11-26 18:30:17 -0800301 return bitmap;
Romain Guy49c5fc02012-05-15 11:10:01 -0700302 }
303
Chris Craik2af46352012-11-26 18:30:17 -0800304 inline SkiaShader* refShader(SkiaShader* shader) {
305 if (!shader) return NULL;
Romain Guy24c00212011-01-14 15:31:00 -0800306
307 SkiaShader* shaderCopy = mShaderMap.valueFor(shader);
308 // TODO: We also need to handle generation ID changes in compose shaders
Romain Guy1f1fcb72011-01-14 15:37:54 -0800309 if (shaderCopy == NULL || shaderCopy->getGenerationId() != shader->getGenerationId()) {
Romain Guy24c00212011-01-14 15:31:00 -0800310 shaderCopy = shader->copy();
Romain Guy96ebc6b2012-02-21 18:32:32 -0800311 // replaceValueFor() performs an add if the entry doesn't exist
312 mShaderMap.replaceValueFor(shader, shaderCopy);
Romain Guy1f1fcb72011-01-14 15:37:54 -0800313 mShaders.add(shaderCopy);
Romain Guy58ecc202012-09-07 11:58:36 -0700314 mCaches.resourceCache.incrementRefcount(shaderCopy);
Romain Guy24c00212011-01-14 15:31:00 -0800315 }
Chris Craik2af46352012-11-26 18:30:17 -0800316 return shaderCopy;
Romain Guy4aa90572010-09-26 18:40:37 -0700317 }
318
Chris Craik2af46352012-11-26 18:30:17 -0800319 inline SkiaColorFilter* refColorFilter(SkiaColorFilter* colorFilter) {
Chet Haasead93c2b2010-10-22 16:17:12 -0700320 mFilterResources.add(colorFilter);
Romain Guy58ecc202012-09-07 11:58:36 -0700321 mCaches.resourceCache.incrementRefcount(colorFilter);
Chris Craik2af46352012-11-26 18:30:17 -0800322 return colorFilter;
Chet Haasead93c2b2010-10-22 16:17:12 -0700323 }
324
Romain Guye3b0a012013-06-26 15:45:41 -0700325 inline Res_png_9patch* refPatch(Res_png_9patch* patch) {
326 mPatchResources.add(patch);
327 mCaches.resourceCache.incrementRefcount(patch);
328 return patch;
329 }
330
Chet Haase5c13d892010-10-08 08:37:55 -0700331 Vector<SkBitmap*> mBitmapResources;
Romain Guy49c5fc02012-05-15 11:10:01 -0700332 Vector<SkBitmap*> mOwnedBitmapResources;
Chet Haasead93c2b2010-10-22 16:17:12 -0700333 Vector<SkiaColorFilter*> mFilterResources;
Romain Guye3b0a012013-06-26 15:45:41 -0700334 Vector<Res_png_9patch*> mPatchResources;
Romain Guy4aa90572010-09-26 18:40:37 -0700335
Chet Haased98aa2d2010-10-25 15:47:32 -0700336 Vector<SkPaint*> mPaints;
Romain Guy0fe478e2010-11-08 12:08:41 -0800337 DefaultKeyedVector<SkPaint*, SkPaint*> mPaintMap;
Romain Guy24c00212011-01-14 15:31:00 -0800338
Romain Guy2fc941e2011-02-03 15:06:05 -0800339 Vector<SkPath*> mPaths;
340 DefaultKeyedVector<SkPath*, SkPath*> mPathMap;
341
Chet Haased34dd712012-05-02 18:50:34 -0700342 SortedVector<SkPath*> mSourcePaths;
343
Romain Guy735738c2012-12-03 12:34:51 -0800344 Vector<SkRegion*> mRegions;
345 DefaultKeyedVector<SkRegion*, SkRegion*> mRegionMap;
346
Romain Guy24c00212011-01-14 15:31:00 -0800347 Vector<SkiaShader*> mShaders;
348 DefaultKeyedVector<SkiaShader*, SkiaShader*> mShaderMap;
349
Chet Haased98aa2d2010-10-25 15:47:32 -0700350 Vector<SkMatrix*> mMatrices;
351
Chet Haase603f6de2012-09-14 15:31:25 -0700352 Vector<Layer*> mLayers;
353
Romain Guy27454a42011-01-23 12:01:41 -0800354 int mRestoreSaveCount;
Romain Guy33f6beb2012-02-16 19:24:51 -0800355
Romain Guy58ecc202012-09-07 11:58:36 -0700356 Caches& mCaches;
Chris Craik2af46352012-11-26 18:30:17 -0800357 sp<DisplayListData> mDisplayListData;
Romain Guy58ecc202012-09-07 11:58:36 -0700358
Romain Guy33f6beb2012-02-16 19:24:51 -0800359 float mTranslateX;
360 float mTranslateY;
361 bool mHasTranslate;
Romain Guy04c9d8c2011-08-25 14:01:48 -0700362 bool mHasDrawOps;
Romain Guy27454a42011-01-23 12:01:41 -0800363
Romain Guy54c1a642012-09-27 17:55:46 -0700364 uint32_t mFunctorCount;
365
Romain Guyb051e892010-09-28 19:09:36 -0700366 friend class DisplayList;
367
Romain Guy4aa90572010-09-26 18:40:37 -0700368}; // class DisplayListRenderer
369
370}; // namespace uirenderer
371}; // namespace android
372
Romain Guy5b3b3522010-10-27 18:57:51 -0700373#endif // ANDROID_HWUI_DISPLAY_LIST_RENDERER_H