summaryrefslogtreecommitdiffstats
path: root/libs/hwui/DisplayListOp.h
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2014-07-01 17:56:52 -0700
committerChris Craik <ccraik@google.com>2014-07-07 19:14:55 +0000
commit59744b79ec302000802cd56d30a1bf70f0183c80 (patch)
tree0057de9a24def27ca543608cd1d5b75b1b89bd57 /libs/hwui/DisplayListOp.h
parent904a1045ced36e844605b9764c3cb184976ea0a9 (diff)
downloadframeworks_base-59744b79ec302000802cd56d30a1bf70f0183c80.zip
frameworks_base-59744b79ec302000802cd56d30a1bf70f0183c80.tar.gz
frameworks_base-59744b79ec302000802cd56d30a1bf70f0183c80.tar.bz2
Add hack for custom re-rasterization buckets
bug:14083128 Moves all of the font transform management into OpenGLRenderer::findBestFontTransform(), and now simply passes down final rasterization transforms into the FontRenderer. Change-Id: Ie02752e6af863347b142367c7d628db5f9fc2998
Diffstat (limited to 'libs/hwui/DisplayListOp.h')
-rw-r--r--libs/hwui/DisplayListOp.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/hwui/DisplayListOp.h b/libs/hwui/DisplayListOp.h
index 9fb972b..901c69e 100644
--- a/libs/hwui/DisplayListOp.h
+++ b/libs/hwui/DisplayListOp.h
@@ -1313,7 +1313,7 @@ public:
const DeferredDisplayState& state) {
const SkPaint* paint = getPaint(renderer);
FontRenderer& fontRenderer = renderer.getCaches().fontRenderer->getFontRenderer(paint);
- fontRenderer.precache(paint, mText, mCount, mat4::identity());
+ fontRenderer.precache(paint, mText, mCount, SkMatrix::I());
deferInfo.batchId = mPaint->getColor() == 0xff000000 ?
DeferredDisplayList::kOpBatch_Text :
@@ -1372,14 +1372,15 @@ public:
const float* positions, const SkPaint* paint, float totalAdvance, const Rect& bounds)
: DrawBoundedOp(bounds, paint), mText(text), mBytesCount(bytesCount), mCount(count),
mX(x), mY(y), mPositions(positions), mTotalAdvance(totalAdvance) {
- memset(&mPrecacheTransform.data[0], 0xff, 16 * sizeof(float));
+ mPrecacheTransform = SkMatrix::InvalidMatrix();
}
virtual void onDefer(OpenGLRenderer& renderer, DeferInfo& deferInfo,
const DeferredDisplayState& state) {
const SkPaint* paint = getPaint(renderer);
FontRenderer& fontRenderer = renderer.getCaches().fontRenderer->getFontRenderer(paint);
- const mat4& transform = renderer.findBestFontTransform(state.mMatrix);
+ SkMatrix transform;
+ renderer.findBestFontTransform(state.mMatrix, &transform);
if (mPrecacheTransform != transform) {
fontRenderer.precache(paint, mText, mCount, transform);
mPrecacheTransform = transform;
@@ -1436,7 +1437,7 @@ private:
float mY;
const float* mPositions;
float mTotalAdvance;
- mat4 mPrecacheTransform;
+ SkMatrix mPrecacheTransform;
};
///////////////////////////////////////////////////////////////////////////////