diff options
author | Derek Sollenberger <djsollen@google.com> | 2017-03-01 13:02:43 -0500 |
---|---|---|
committer | Derek Sollenberger <djsollen@google.com> | 2017-03-02 15:28:19 -0500 |
commit | ea1fe9b9d6ff9f0a543489979a0a909acc9ea564 (patch) | |
tree | d3756d96996affb4ab248f212fb7b17291e14329 /libs/hwui/pipeline/skia/SkiaDisplayList.cpp | |
parent | 23e6ad0edab63091181f87b1b42ba931570c5496 (diff) |
Update SkiaDisplayList to use the modified SkLiteDL
SkLiteDL is no longer refcounted or a subclass of SkDrawable.
Test: on device testing in SkiaGL mode
Change-Id: I9ad53d764a26ab382d80d54908325962f2075802
Diffstat (limited to 'libs/hwui/pipeline/skia/SkiaDisplayList.cpp')
-rw-r--r-- | libs/hwui/pipeline/skia/SkiaDisplayList.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libs/hwui/pipeline/skia/SkiaDisplayList.cpp b/libs/hwui/pipeline/skia/SkiaDisplayList.cpp index b4babcb9564e..496f7babd3cc 100644 --- a/libs/hwui/pipeline/skia/SkiaDisplayList.cpp +++ b/libs/hwui/pipeline/skia/SkiaDisplayList.cpp @@ -27,10 +27,6 @@ namespace android { namespace uirenderer { namespace skiapipeline { -SkiaDisplayList::SkiaDisplayList(SkRect bounds) : mDrawable(SkLiteDL::New(bounds)) { - SkASSERT(projectionReceiveIndex == -1); -} - void SkiaDisplayList::syncContents() { for (auto& functor : mChildFunctors) { functor.syncFunctor(); @@ -41,7 +37,7 @@ void SkiaDisplayList::syncContents() { } bool SkiaDisplayList::reuseDisplayList(RenderNode* node, renderthread::CanvasContext* context) { - reset(SkRect::MakeEmpty()); + reset(); node->attachAvailableList(this); return true; } @@ -102,10 +98,10 @@ bool SkiaDisplayList::prepareListAndChildren(TreeObserver& observer, TreeInfo& i return isDirty; } -void SkiaDisplayList::reset(SkRect bounds) { +void SkiaDisplayList::reset() { mProjectionReceiver = nullptr; - mDrawable->reset(bounds); + mDisplayList.reset(); mMutableImages.clear(); mVectorDrawables.clear(); @@ -119,7 +115,7 @@ void SkiaDisplayList::reset(SkRect bounds) { void SkiaDisplayList::output(std::ostream& output, uint32_t level) { DumpOpsCanvas canvas(output, level, *this); - mDrawable->draw(&canvas, nullptr); + mDisplayList.draw(&canvas); } }; // namespace skiapipeline |