From 58f09b352417c4ff7e01365727cbf8a09b9bed23 Mon Sep 17 00:00:00 2001 From: Alan Viverette Date: Wed, 8 Jan 2014 17:18:19 -0800 Subject: Add DisplayList bit for projecting onto a contained volume Does not handle reordering/translating the projected DisplayList. Change-Id: I6f1ebb2b20b7436c86fe849b35d582fd9c8a8967 --- libs/hwui/DisplayList.cpp | 1 + libs/hwui/DisplayList.h | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'libs/hwui') diff --git a/libs/hwui/DisplayList.cpp b/libs/hwui/DisplayList.cpp index 8da425d..6b28efe 100644 --- a/libs/hwui/DisplayList.cpp +++ b/libs/hwui/DisplayList.cpp @@ -238,6 +238,7 @@ void DisplayList::init() { mBottom = 0; mClipToBounds = true; mIsContainedVolume = true; + mProjectToContainedVolume = false; mAlpha = 1; mHasOverlappingRendering = true; mTranslationX = 0; diff --git a/libs/hwui/DisplayList.h b/libs/hwui/DisplayList.h index 3f9ad9b..204a131 100644 --- a/libs/hwui/DisplayList.h +++ b/libs/hwui/DisplayList.h @@ -189,6 +189,10 @@ public: mIsContainedVolume = isContainedVolume; } + void setProjectToContainedVolume(bool shouldProject) { + mProjectToContainedVolume = shouldProject; + } + void setStaticMatrix(SkMatrix* matrix) { delete mStaticMatrix; mStaticMatrix = new SkMatrix(*matrix); @@ -572,9 +576,10 @@ private: String8 mName; bool mDestroyed; // used for debugging crash, TODO: remove once invalid state crash fixed - // View properties + // Rendering properties bool mClipToBounds; bool mIsContainedVolume; + bool mProjectToContainedVolume; float mAlpha; bool mHasOverlappingRendering; float mTranslationX, mTranslationY, mTranslationZ; -- cgit v1.1