diff options
author | Chris Craik <ccraik@google.com> | 2014-08-19 22:36:32 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-08-19 02:43:23 +0000 |
commit | 83f75c88a0f0dce2e7d92348d5a498caf32cbdbd (patch) | |
tree | fceb673a1a8743c7fec278dc953301cb18ed0a7c /libs/hwui/DisplayListOp.h | |
parent | 1553a528a5e2a2eeb94318601943fad2d9484bb3 (diff) | |
parent | 947eabf42d835d0dfb0daa2fe6d869139c7000d6 (diff) | |
download | frameworks_base-83f75c88a0f0dce2e7d92348d5a498caf32cbdbd.zip frameworks_base-83f75c88a0f0dce2e7d92348d5a498caf32cbdbd.tar.gz frameworks_base-83f75c88a0f0dce2e7d92348d5a498caf32cbdbd.tar.bz2 |
Merge "Early reject drawText calls that will not draw" into lmp-dev
Diffstat (limited to 'libs/hwui/DisplayListOp.h')
-rw-r--r-- | libs/hwui/DisplayListOp.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/hwui/DisplayListOp.h b/libs/hwui/DisplayListOp.h index 1032a75..5f533a7 100644 --- a/libs/hwui/DisplayListOp.h +++ b/libs/hwui/DisplayListOp.h @@ -1001,6 +1001,8 @@ class DrawStrokableOp : public DrawBoundedOp { public: DrawStrokableOp(float left, float top, float right, float bottom, const SkPaint* paint) : DrawBoundedOp(left, top, right, bottom, paint) {}; + DrawStrokableOp(const Rect& localBounds, const SkPaint* paint) + : DrawBoundedOp(localBounds, paint) {}; virtual bool getLocalBounds(Rect& localBounds) { localBounds.set(mLocalBounds); @@ -1339,11 +1341,11 @@ private: const float* mPositions; }; -class DrawTextOp : public DrawBoundedOp { +class DrawTextOp : public DrawStrokableOp { public: DrawTextOp(const char* text, int bytesCount, int count, float x, float y, const float* positions, const SkPaint* paint, float totalAdvance, const Rect& bounds) - : DrawBoundedOp(bounds, paint), mText(text), mBytesCount(bytesCount), mCount(count), + : DrawStrokableOp(bounds, paint), mText(text), mBytesCount(bytesCount), mCount(count), mX(x), mY(y), mPositions(positions), mTotalAdvance(totalAdvance) { mPrecacheTransform = SkMatrix::InvalidMatrix(); } |