summaryrefslogtreecommitdiff
path: root/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
diff options
context:
space:
mode:
authorStan Iliev <stani@google.com>2017-03-23 00:12:50 -0400
committerStan Iliev <stani@google.com>2017-03-27 18:43:34 -0400
commit23c38a9ed9c28a9fda438e7d30532aad7a3844f7 (patch)
tree50c757670e0691327a730a8fc457f1cd7135594b /libs/hwui/pipeline/skia/SkiaDisplayList.cpp
parent4110be3a153daed2d62a549a36e9f92986addf29 (diff)
Update VectorDrawables cache at frame start
Draw VectorDrawables in GPU backed surface. Render VD cache at the beginning of the frame to avoid context switching. Test: CTS graphics tests pass. Change-Id: Ia14e0ec4049c3fa87f03547fbda44043bf8dd793
Diffstat (limited to 'libs/hwui/pipeline/skia/SkiaDisplayList.cpp')
-rw-r--r--libs/hwui/pipeline/skia/SkiaDisplayList.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/hwui/pipeline/skia/SkiaDisplayList.cpp b/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
index 496f7babd3cc..3ddc09fbeca1 100644
--- a/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
+++ b/libs/hwui/pipeline/skia/SkiaDisplayList.cpp
@@ -19,6 +19,7 @@
#include "renderthread/CanvasContext.h"
#include "VectorDrawable.h"
#include "DumpOpsCanvas.h"
+#include "SkiaPipeline.h"
#include <SkImagePriv.h>
@@ -92,6 +93,8 @@ bool SkiaDisplayList::prepareListAndChildren(TreeObserver& observer, TreeInfo& i
// If any vector drawable in the display list needs update, damage the node.
if (vectorDrawable->isDirty()) {
isDirty = true;
+ static_cast<SkiaPipeline*>(info.canvasContext.getRenderPipeline())
+ ->getVectorDrawables()->push_back(vectorDrawable);
}
vectorDrawable->setPropertyChangeWillBeConsumed(true);
}