blob: 6c8e8f587c7f3b0e1aa533853524e41b5890ad58 [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
20#include <SkChunkAlloc.h>
21#include <SkFlattenable.h>
22#include <SkMatrix.h>
23#include <SkPaint.h>
24#include <SkPath.h>
25#include <SkPictureFlat.h>
26#include <SkRefCnt.h>
27#include <SkTDArray.h>
28#include <SkTSearch.h>
29
30#include "OpenGLRenderer.h"
Chet Haasedaf98e92011-01-10 14:10:36 -080031#include "Functor.h"
Romain Guy4aa90572010-09-26 18:40:37 -070032
33namespace android {
34namespace uirenderer {
35
36///////////////////////////////////////////////////////////////////////////////
37// Defines
38///////////////////////////////////////////////////////////////////////////////
39
40#define MIN_WRITER_SIZE 16384
41#define HEAP_BLOCK_SIZE 4096
42
Romain Guyffac7fc2011-01-13 17:21:49 -080043// Debug
44#if DEBUG_DISPLAY_LIST
45 #define DISPLAY_LIST_LOGD(...) LOGD(__VA_ARGS__)
46#else
47 #define DISPLAY_LIST_LOGD(...)
48#endif
49
Romain Guy4aa90572010-09-26 18:40:37 -070050///////////////////////////////////////////////////////////////////////////////
51// Helpers
52///////////////////////////////////////////////////////////////////////////////
53
54class PathHeap: public SkRefCnt {
55public:
Romain Guy7975fb62010-10-01 16:36:14 -070056 PathHeap();
57 PathHeap(SkFlattenableReadBuffer& buffer);
58 ~PathHeap();
Romain Guy4aa90572010-09-26 18:40:37 -070059
Romain Guy7975fb62010-10-01 16:36:14 -070060 int append(const SkPath& path);
Romain Guy4aa90572010-09-26 18:40:37 -070061
62 int count() const { return mPaths.count(); }
63
Romain Guyb051e892010-09-28 19:09:36 -070064 SkPath& operator[](int index) const {
Romain Guy4aa90572010-09-26 18:40:37 -070065 return *mPaths[index];
66 }
67
Romain Guy7975fb62010-10-01 16:36:14 -070068 void flatten(SkFlattenableWriteBuffer& buffer) const;
Romain Guy4aa90572010-09-26 18:40:37 -070069
70private:
71 SkChunkAlloc mHeap;
72 SkTDArray<SkPath*> mPaths;
73};
74
75///////////////////////////////////////////////////////////////////////////////
Romain Guyb051e892010-09-28 19:09:36 -070076// Display list
Romain Guy4aa90572010-09-26 18:40:37 -070077///////////////////////////////////////////////////////////////////////////////
78
Romain Guyb051e892010-09-28 19:09:36 -070079class DisplayListRenderer;
80
Romain Guy4aa90572010-09-26 18:40:37 -070081/**
Romain Guyb051e892010-09-28 19:09:36 -070082 * Replays recorded drawing commands.
Romain Guy4aa90572010-09-26 18:40:37 -070083 */
Romain Guyb051e892010-09-28 19:09:36 -070084class DisplayList {
Romain Guy4aa90572010-09-26 18:40:37 -070085public:
Romain Guyb051e892010-09-28 19:09:36 -070086 DisplayList(const DisplayListRenderer& recorder);
87 ~DisplayList();
Romain Guy4aa90572010-09-26 18:40:37 -070088
Romain Guyffac7fc2011-01-13 17:21:49 -080089 // IMPORTANT: Update the intialization of OP_NAMES in the .cpp file
90 // when modifying this file
Romain Guy4aa90572010-09-26 18:40:37 -070091 enum Op {
Romain Guyffac7fc2011-01-13 17:21:49 -080092 AcquireContext = 0,
Romain Guy4aa90572010-09-26 18:40:37 -070093 ReleaseContext,
94 Save,
95 Restore,
96 RestoreToCount,
97 SaveLayer,
Romain Guy5b3b3522010-10-27 18:57:51 -070098 SaveLayerAlpha,
Romain Guy4aa90572010-09-26 18:40:37 -070099 Translate,
100 Rotate,
101 Scale,
Romain Guy807daf72011-01-18 11:19:19 -0800102 Skew,
Romain Guy4aa90572010-09-26 18:40:37 -0700103 SetMatrix,
104 ConcatMatrix,
105 ClipRect,
Romain Guy0fe478e2010-11-08 12:08:41 -0800106 DrawDisplayList,
Romain Guy6c319ca2011-01-11 14:29:25 -0800107 DrawLayer,
Romain Guy4aa90572010-09-26 18:40:37 -0700108 DrawBitmap,
109 DrawBitmapMatrix,
110 DrawBitmapRect,
Romain Guy5a7b4662011-01-20 19:09:30 -0800111 DrawBitmapMesh,
Romain Guy4aa90572010-09-26 18:40:37 -0700112 DrawPatch,
113 DrawColor,
114 DrawRect,
Romain Guy01d58e42011-01-19 21:54:02 -0800115 DrawRoundRect,
116 DrawCircle,
Romain Guyc1cd9ba32011-01-23 14:18:41 -0800117 DrawOval,
Romain Guy8b2f5262011-01-23 16:15:02 -0800118 DrawArc,
Romain Guy4aa90572010-09-26 18:40:37 -0700119 DrawPath,
120 DrawLines,
121 DrawText,
122 ResetShader,
123 SetupShader,
124 ResetColorFilter,
125 SetupColorFilter,
126 ResetShadow,
Romain Guyffac7fc2011-01-13 17:21:49 -0800127 SetupShadow,
Chet Haasedaf98e92011-01-10 14:10:36 -0800128 DrawGLFunction,
Romain Guy4aa90572010-09-26 18:40:37 -0700129 };
130
Romain Guyffac7fc2011-01-13 17:21:49 -0800131 static const char* OP_NAMES[];
132
Chet Haase5977baa2011-01-05 18:01:22 -0800133 void initFromDisplayListRenderer(const DisplayListRenderer& recorder);
134
Chet Haasedaf98e92011-01-10 14:10:36 -0800135 bool replay(OpenGLRenderer& renderer, uint32_t level = 0);
Romain Guyb051e892010-09-28 19:09:36 -0700136
137private:
138 void init();
139
140 class TextContainer {
141 public:
142 size_t length() const {
143 return mByteLength;
144 }
145
146 const char* text() const {
147 return (const char*) mText;
148 }
149
150 size_t mByteLength;
151 const char* mText;
152 };
153
154 SkBitmap* getBitmap() {
Chet Haase5c13d892010-10-08 08:37:55 -0700155 return (SkBitmap*) getInt();
156 }
157
158 SkiaShader* getShader() {
159 return (SkiaShader*) getInt();
Romain Guyb051e892010-09-28 19:09:36 -0700160 }
161
Chet Haasead93c2b2010-10-22 16:17:12 -0700162 SkiaColorFilter* getColorFilter() {
163 return (SkiaColorFilter*) getInt();
164 }
165
Romain Guyb051e892010-09-28 19:09:36 -0700166 inline int getIndex() {
167 return mReader.readInt();
168 }
169
170 inline int getInt() {
171 return mReader.readInt();
172 }
173
174 SkMatrix* getMatrix() {
Chet Haase5c13d892010-10-08 08:37:55 -0700175 return (SkMatrix*) getInt();
Romain Guyb051e892010-09-28 19:09:36 -0700176 }
177
178 SkPath* getPath() {
179 return &(*mPathHeap)[getInt() - 1];
180 }
181
182 SkPaint* getPaint() {
Chet Haase5c13d892010-10-08 08:37:55 -0700183 return (SkPaint*) getInt();
Romain Guyb051e892010-09-28 19:09:36 -0700184 }
185
Romain Guy0fe478e2010-11-08 12:08:41 -0800186 DisplayList* getDisplayList() {
187 return (DisplayList*) getInt();
188 }
189
Romain Guyb051e892010-09-28 19:09:36 -0700190 inline float getFloat() {
191 return mReader.readScalar();
192 }
193
194 int32_t* getInts(uint32_t& count) {
195 count = getInt();
196 return (int32_t*) mReader.skip(count * sizeof(int32_t));
197 }
198
Romain Guy4bb94202010-10-12 15:59:26 -0700199 uint32_t* getUInts(int8_t& count) {
200 count = getInt();
201 return (uint32_t*) mReader.skip(count * sizeof(uint32_t));
202 }
203
Romain Guyb051e892010-09-28 19:09:36 -0700204 float* getFloats(int& count) {
205 count = getInt();
206 return (float*) mReader.skip(count * sizeof(float));
207 }
208
209 void getText(TextContainer* text) {
210 size_t length = text->mByteLength = getInt();
211 text->mText = (const char*) mReader.skip(length);
212 }
213
214 PathHeap* mPathHeap;
215
Chet Haase5c13d892010-10-08 08:37:55 -0700216 Vector<SkBitmap*> mBitmapResources;
Chet Haasead93c2b2010-10-22 16:17:12 -0700217 Vector<SkiaColorFilter*> mFilterResources;
Romain Guyb051e892010-09-28 19:09:36 -0700218
Chet Haased98aa2d2010-10-25 15:47:32 -0700219 Vector<SkPaint*> mPaints;
220 Vector<SkMatrix*> mMatrices;
Romain Guy24c00212011-01-14 15:31:00 -0800221 Vector<SkiaShader*> mShaders;
Chet Haased98aa2d2010-10-25 15:47:32 -0700222
Romain Guyb051e892010-09-28 19:09:36 -0700223 mutable SkFlattenableReadBuffer mReader;
224
225 SkRefCntPlayback mRCPlayback;
226 SkTypefacePlayback mTFPlayback;
227};
228
229///////////////////////////////////////////////////////////////////////////////
230// Renderer
231///////////////////////////////////////////////////////////////////////////////
232
233/**
234 * Records drawing commands in a display list for latter playback.
235 */
236class DisplayListRenderer: public OpenGLRenderer {
237public:
238 DisplayListRenderer();
239 ~DisplayListRenderer();
240
Chet Haase5977baa2011-01-05 18:01:22 -0800241 DisplayList* getDisplayList();
242
Romain Guyb051e892010-09-28 19:09:36 -0700243 void setViewport(int width, int height);
Romain Guy6b7bd242010-10-06 19:49:23 -0700244 void prepare(bool opaque);
Romain Guy27454a42011-01-23 12:01:41 -0800245 void finish();
Romain Guyb051e892010-09-28 19:09:36 -0700246
Chet Haasedaf98e92011-01-10 14:10:36 -0800247 bool callDrawGLFunction(Functor *functor);
Romain Guy4aa90572010-09-26 18:40:37 -0700248 void acquireContext();
249 void releaseContext();
250
Chet Haasedaf98e92011-01-10 14:10:36 -0800251 void interrupt();
252 void resume();
253
Romain Guy4aa90572010-09-26 18:40:37 -0700254 int save(int flags);
255 void restore();
256 void restoreToCount(int saveCount);
257
258 int saveLayer(float left, float top, float right, float bottom,
Chet Haase5c13d892010-10-08 08:37:55 -0700259 SkPaint* p, int flags);
Romain Guy5b3b3522010-10-27 18:57:51 -0700260 int saveLayerAlpha(float left, float top, float right, float bottom,
261 int alpha, int flags);
Romain Guy4aa90572010-09-26 18:40:37 -0700262
263 void translate(float dx, float dy);
264 void rotate(float degrees);
265 void scale(float sx, float sy);
Romain Guy807daf72011-01-18 11:19:19 -0800266 void skew(float sx, float sy);
Romain Guy4aa90572010-09-26 18:40:37 -0700267
268 void setMatrix(SkMatrix* matrix);
269 void concatMatrix(SkMatrix* matrix);
270
271 bool clipRect(float left, float top, float right, float bottom, SkRegion::Op op);
272
Chet Haasedaf98e92011-01-10 14:10:36 -0800273 bool drawDisplayList(DisplayList* displayList, uint32_t level = 0);
Romain Guyada830f2011-01-13 12:13:20 -0800274 void drawLayer(Layer* layer, float x, float y, SkPaint* paint);
Chet Haase5c13d892010-10-08 08:37:55 -0700275 void drawBitmap(SkBitmap* bitmap, float left, float top, SkPaint* paint);
276 void drawBitmap(SkBitmap* bitmap, SkMatrix* matrix, SkPaint* paint);
Romain Guy4aa90572010-09-26 18:40:37 -0700277 void drawBitmap(SkBitmap* bitmap, float srcLeft, float srcTop,
278 float srcRight, float srcBottom, float dstLeft, float dstTop,
Chet Haase5c13d892010-10-08 08:37:55 -0700279 float dstRight, float dstBottom, SkPaint* paint);
Romain Guy5a7b4662011-01-20 19:09:30 -0800280 void drawBitmapMesh(SkBitmap* bitmap, int meshWidth, int meshHeight,
281 float* vertices, int* colors, SkPaint* paint);
Romain Guy4aa90572010-09-26 18:40:37 -0700282 void drawPatch(SkBitmap* bitmap, const int32_t* xDivs, const int32_t* yDivs,
Romain Guy4bb94202010-10-12 15:59:26 -0700283 const uint32_t* colors, uint32_t width, uint32_t height, int8_t numColors,
Chet Haase5c13d892010-10-08 08:37:55 -0700284 float left, float top, float right, float bottom, SkPaint* paint);
Romain Guy4aa90572010-09-26 18:40:37 -0700285 void drawColor(int color, SkXfermode::Mode mode);
Chet Haase5c13d892010-10-08 08:37:55 -0700286 void drawRect(float left, float top, float right, float bottom, SkPaint* paint);
Romain Guy01d58e42011-01-19 21:54:02 -0800287 void drawRoundRect(float left, float top, float right, float bottom,
288 float rx, float ry, SkPaint* paint);
289 void drawCircle(float x, float y, float radius, SkPaint* paint);
Romain Guyc1cd9ba32011-01-23 14:18:41 -0800290 void drawOval(float left, float top, float right, float bottom, SkPaint* paint);
Romain Guy8b2f5262011-01-23 16:15:02 -0800291 void drawArc(float left, float top, float right, float bottom,
292 float startAngle, float sweepAngle, bool useCenter, SkPaint* paint);
Romain Guy4aa90572010-09-26 18:40:37 -0700293 void drawPath(SkPath* path, SkPaint* paint);
Chet Haase5c13d892010-10-08 08:37:55 -0700294 void drawLines(float* points, int count, SkPaint* paint);
Romain Guy4aa90572010-09-26 18:40:37 -0700295 void drawText(const char* text, int bytesCount, int count, float x, float y, SkPaint* paint);
296
297 void resetShader();
298 void setupShader(SkiaShader* shader);
299
300 void resetColorFilter();
301 void setupColorFilter(SkiaColorFilter* filter);
302
303 void resetShadow();
304 void setupShadow(float radius, float dx, float dy, int color);
305
306 void reset();
307
Romain Guyb051e892010-09-28 19:09:36 -0700308 const SkWriter32& writeStream() const {
309 return mWriter;
310 }
311
Chet Haase5c13d892010-10-08 08:37:55 -0700312 const Vector<SkBitmap*>& getBitmapResources() const {
313 return mBitmapResources;
Romain Guyb051e892010-09-28 19:09:36 -0700314 }
315
Romain Guy24c00212011-01-14 15:31:00 -0800316 const Vector<SkiaShader*>& getShaders() const {
317 return mShaders;
Romain Guyb051e892010-09-28 19:09:36 -0700318 }
319
Chet Haased98aa2d2010-10-25 15:47:32 -0700320 const Vector<SkPaint*>& getPaints() const {
321 return mPaints;
322 }
323
324 const Vector<SkMatrix*>& getMatrices() const {
325 return mMatrices;
326 }
327
Chet Haasead93c2b2010-10-22 16:17:12 -0700328 const Vector<SkiaColorFilter*>& getFilterResources() const {
329 return mFilterResources;
330 }
331
Romain Guy4aa90572010-09-26 18:40:37 -0700332private:
Romain Guy27454a42011-01-23 12:01:41 -0800333 void insertRestoreToCount() {
334 if (mRestoreSaveCount >= 0) {
335 mWriter.writeInt(DisplayList::RestoreToCount);
336 addInt(mRestoreSaveCount);
337 mRestoreSaveCount = -1;
338 }
339 }
340
Romain Guyb051e892010-09-28 19:09:36 -0700341 inline void addOp(DisplayList::Op drawOp) {
Romain Guy27454a42011-01-23 12:01:41 -0800342 insertRestoreToCount();
Romain Guy4aa90572010-09-26 18:40:37 -0700343 mWriter.writeInt(drawOp);
344 }
345
346 inline void addInt(int value) {
347 mWriter.writeInt(value);
348 }
349
350 void addInts(const int32_t* values, uint32_t count) {
Romain Guyb051e892010-09-28 19:09:36 -0700351 mWriter.writeInt(count);
Romain Guy4aa90572010-09-26 18:40:37 -0700352 for (uint32_t i = 0; i < count; i++) {
353 mWriter.writeInt(values[i]);
354 }
355 }
356
Romain Guy4bb94202010-10-12 15:59:26 -0700357 void addUInts(const uint32_t* values, int8_t count) {
358 mWriter.writeInt(count);
359 for (int8_t i = 0; i < count; i++) {
360 mWriter.writeInt(values[i]);
361 }
362 }
363
Romain Guy4aa90572010-09-26 18:40:37 -0700364 inline void addFloat(float value) {
365 mWriter.writeScalar(value);
366 }
367
368 void addFloats(const float* values, int count) {
Romain Guyb051e892010-09-28 19:09:36 -0700369 mWriter.writeInt(count);
Romain Guy4aa90572010-09-26 18:40:37 -0700370 for (int i = 0; i < count; i++) {
371 mWriter.writeScalar(values[i]);
372 }
373 }
374
375 inline void addPoint(float x, float y) {
376 mWriter.writeScalar(x);
377 mWriter.writeScalar(y);
378 }
379
380 inline void addBounds(float left, float top, float right, float bottom) {
381 mWriter.writeScalar(left);
382 mWriter.writeScalar(top);
383 mWriter.writeScalar(right);
384 mWriter.writeScalar(bottom);
385 }
386
387 inline void addText(const void* text, size_t byteLength) {
388 mWriter.writeInt(byteLength);
389 mWriter.writePad(text, byteLength);
390 }
391
392 inline void addPath(const SkPath* path) {
393 if (mPathHeap == NULL) {
394 mPathHeap = new PathHeap();
395 }
396 addInt(mPathHeap->append(*path));
397 }
398
Chet Haase5c13d892010-10-08 08:37:55 -0700399 inline void addPaint(SkPaint* paint) {
Romain Guy24c00212011-01-14 15:31:00 -0800400 if (!paint) {
Romain Guy0fe478e2010-11-08 12:08:41 -0800401 addInt((int) NULL);
Chet Haased98aa2d2010-10-25 15:47:32 -0700402 return;
403 }
Romain Guy0fe478e2010-11-08 12:08:41 -0800404
Romain Guy24c00212011-01-14 15:31:00 -0800405 SkPaint* paintCopy = mPaintMap.valueFor(paint);
Chet Haased98aa2d2010-10-25 15:47:32 -0700406 if (paintCopy == NULL || paintCopy->getGenerationID() != paint->getGenerationID()) {
407 paintCopy = new SkPaint(*paint);
408 mPaintMap.add(paint, paintCopy);
409 mPaints.add(paintCopy);
410 }
Romain Guy0fe478e2010-11-08 12:08:41 -0800411
412 addInt((int) paintCopy);
413 }
414
415 inline void addDisplayList(DisplayList* displayList) {
416 // TODO: To be safe, the display list should be ref-counted in the
417 // resources cache, but we rely on the caller (UI toolkit) to
418 // do the right thing for now
419 addInt((int) displayList);
Romain Guy4aa90572010-09-26 18:40:37 -0700420 }
421
Chet Haase5c13d892010-10-08 08:37:55 -0700422 inline void addMatrix(SkMatrix* matrix) {
Chet Haased98aa2d2010-10-25 15:47:32 -0700423 // Copying the matrix is cheap and prevents against the user changing the original
424 // matrix before the operation that uses it
425 addInt((int) new SkMatrix(*matrix));
Romain Guy4aa90572010-09-26 18:40:37 -0700426 }
427
Chet Haase5c13d892010-10-08 08:37:55 -0700428 inline void addBitmap(SkBitmap* bitmap) {
Chet Haased98aa2d2010-10-25 15:47:32 -0700429 // Note that this assumes the bitmap is immutable. There are cases this won't handle
430 // correctly, such as creating the bitmap from scratch, drawing with it, changing its
431 // contents, and drawing again. The only fix would be to always copy it the first time,
432 // which doesn't seem worth the extra cycles for this unlikely case.
Romain Guy0fe478e2010-11-08 12:08:41 -0800433 addInt((int) bitmap);
Chet Haase5c13d892010-10-08 08:37:55 -0700434 mBitmapResources.add(bitmap);
435 Caches& caches = Caches::getInstance();
436 caches.resourceCache.incrementRefcount(bitmap);
437 }
Romain Guy4aa90572010-09-26 18:40:37 -0700438
Chet Haase5c13d892010-10-08 08:37:55 -0700439 inline void addShader(SkiaShader* shader) {
Romain Guy24c00212011-01-14 15:31:00 -0800440 if (!shader) {
441 addInt((int) NULL);
442 return;
443 }
444
445 SkiaShader* shaderCopy = mShaderMap.valueFor(shader);
446 // TODO: We also need to handle generation ID changes in compose shaders
Romain Guy1f1fcb72011-01-14 15:37:54 -0800447 if (shaderCopy == NULL || shaderCopy->getGenerationId() != shader->getGenerationId()) {
Romain Guy24c00212011-01-14 15:31:00 -0800448 shaderCopy = shader->copy();
449 mShaderMap.add(shader, shaderCopy);
Romain Guy1f1fcb72011-01-14 15:37:54 -0800450 mShaders.add(shaderCopy);
Romain Guy43ccf462011-01-14 18:51:01 -0800451 Caches::getInstance().resourceCache.incrementRefcount(shaderCopy);
Romain Guy24c00212011-01-14 15:31:00 -0800452 }
453
454 addInt((int) shaderCopy);
Romain Guy4aa90572010-09-26 18:40:37 -0700455 }
456
Chet Haasead93c2b2010-10-22 16:17:12 -0700457 inline void addColorFilter(SkiaColorFilter* colorFilter) {
Romain Guy0fe478e2010-11-08 12:08:41 -0800458 addInt((int) colorFilter);
Chet Haasead93c2b2010-10-22 16:17:12 -0700459 mFilterResources.add(colorFilter);
460 Caches& caches = Caches::getInstance();
461 caches.resourceCache.incrementRefcount(colorFilter);
462 }
463
Romain Guy4aa90572010-09-26 18:40:37 -0700464 SkChunkAlloc mHeap;
465
Chet Haase5c13d892010-10-08 08:37:55 -0700466 Vector<SkBitmap*> mBitmapResources;
Chet Haasead93c2b2010-10-22 16:17:12 -0700467 Vector<SkiaColorFilter*> mFilterResources;
Romain Guy4aa90572010-09-26 18:40:37 -0700468
Chet Haased98aa2d2010-10-25 15:47:32 -0700469 Vector<SkPaint*> mPaints;
Romain Guy0fe478e2010-11-08 12:08:41 -0800470 DefaultKeyedVector<SkPaint*, SkPaint*> mPaintMap;
Romain Guy24c00212011-01-14 15:31:00 -0800471
472 Vector<SkiaShader*> mShaders;
473 DefaultKeyedVector<SkiaShader*, SkiaShader*> mShaderMap;
474
Chet Haased98aa2d2010-10-25 15:47:32 -0700475 Vector<SkMatrix*> mMatrices;
476
Romain Guy4aa90572010-09-26 18:40:37 -0700477 PathHeap* mPathHeap;
478 SkWriter32 mWriter;
479
480 SkRefCntRecorder mRCRecorder;
481 SkRefCntRecorder mTFRecorder;
482
Chet Haase5977baa2011-01-05 18:01:22 -0800483 DisplayList *mDisplayList;
484
Romain Guy27454a42011-01-23 12:01:41 -0800485 int mRestoreSaveCount;
486
Romain Guyb051e892010-09-28 19:09:36 -0700487 friend class DisplayList;
488
Romain Guy4aa90572010-09-26 18:40:37 -0700489}; // class DisplayListRenderer
490
491}; // namespace uirenderer
492}; // namespace android
493
Romain Guy5b3b3522010-10-27 18:57:51 -0700494#endif // ANDROID_HWUI_DISPLAY_LIST_RENDERER_H