summaryrefslogtreecommitdiffstats
path: root/libs/hwui/DisplayListRenderer.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/DisplayListRenderer.h')
-rw-r--r--libs/hwui/DisplayListRenderer.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h
index f4ae573..46506e4 100644
--- a/libs/hwui/DisplayListRenderer.h
+++ b/libs/hwui/DisplayListRenderer.h
@@ -28,6 +28,8 @@
#include <cutils/compiler.h>
+#include <utils/String8.h>
+
#include "DisplayListLogBuffer.h"
#include "OpenGLRenderer.h"
#include "utils/Functor.h"
@@ -96,12 +98,15 @@ public:
DrawLines,
DrawPoints,
DrawText,
+ DrawPosText,
ResetShader,
SetupShader,
ResetColorFilter,
SetupColorFilter,
ResetShadow,
SetupShadow,
+ ResetPaintFilter,
+ SetupPaintFilter,
DrawGLFunction,
};
@@ -125,6 +130,12 @@ public:
return mIsRenderable;
}
+ void setName(const char* name) {
+ if (name) {
+ mName.setTo(name);
+ }
+ }
+
private:
void init();
@@ -176,8 +187,8 @@ private:
return (SkPath*) getInt();
}
- SkPaint* getPaint() {
- return (SkPaint*) getInt();
+ SkPaint* getPaint(OpenGLRenderer& renderer) {
+ return renderer.filterPaint((SkPaint*) getInt());
}
DisplayList* getDisplayList() {
@@ -221,6 +232,8 @@ private:
size_t mSize;
bool mIsRenderable;
+
+ String8 mName;
};
///////////////////////////////////////////////////////////////////////////////
@@ -290,6 +303,8 @@ public:
virtual void drawLines(float* points, int count, SkPaint* paint);
virtual void drawPoints(float* points, int count, SkPaint* paint);
virtual void drawText(const char* text, int bytesCount, int count, float x, float y,
+ SkPaint* paint, float length = 1.0f);
+ virtual void drawPosText(const char* text, int bytesCount, int count, const float* positions,
SkPaint* paint);
virtual void resetShader();
@@ -301,6 +316,9 @@ public:
virtual void resetShadow();
virtual void setupShadow(float radius, float dx, float dy, int color);
+ virtual void resetPaintFilter();
+ virtual void setupPaintFilter(int clearBits, int setBits);
+
ANDROID_API void reset();
const SkWriter32& writeStream() const {
@@ -419,7 +437,7 @@ private:
return;
}
- SkPaint* paintCopy = mPaintMap.valueFor(paint);
+ SkPaint* paintCopy = mPaintMap.valueFor(paint);
if (paintCopy == NULL || paintCopy->getGenerationID() != paint->getGenerationID()) {
paintCopy = new SkPaint(*paint);
mPaintMap.add(paint, paintCopy);