diff options
| author | 2015-11-02 19:17:45 -0800 | |
|---|---|---|
| committer | 2015-11-05 15:25:12 -0800 | |
| commit | 76caecf421b42e9b8294a65f62ff2d90b55a337b (patch) | |
| tree | 74ff2357d77c6b831aa3723d9f38416b3cef0d67 /libs/hwui/RenderProperties.h | |
| parent | 429c5b93ff66e82fa3fd65475489fde133c66002 (diff) | |
Add more RenderNode property support in OpReorderer path
Change-Id: I0163fe91d8145e33019739c191bbab0432a5f9aa
Diffstat (limited to 'libs/hwui/RenderProperties.h')
| -rw-r--r-- | libs/hwui/RenderProperties.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/libs/hwui/RenderProperties.h b/libs/hwui/RenderProperties.h index abef806a6975..ca7789e6f19a 100644 --- a/libs/hwui/RenderProperties.h +++ b/libs/hwui/RenderProperties.h @@ -16,23 +16,24 @@ #ifndef RENDERNODEPROPERTIES_H #define RENDERNODEPROPERTIES_H -#include <algorithm> -#include <stddef.h> -#include <vector> -#include <cutils/compiler.h> -#include <androidfw/ResourceTypes.h> -#include <utils/Log.h> +#include "Caches.h" +#include "DeviceInfo.h" +#include "Rect.h" +#include "RevealClip.h" +#include "Outline.h" +#include "utils/MathUtils.h" #include <SkCamera.h> #include <SkMatrix.h> #include <SkRegion.h> #include <SkXfermode.h> -#include "Caches.h" -#include "Rect.h" -#include "RevealClip.h" -#include "Outline.h" -#include "utils/MathUtils.h" +#include <algorithm> +#include <stddef.h> +#include <vector> +#include <cutils/compiler.h> +#include <androidfw/ResourceTypes.h> +#include <utils/Log.h> class SkBitmap; class SkColorFilter; @@ -608,10 +609,11 @@ public: } bool promotedToLayer() const { - const int maxTextureSize = Caches::getInstance().maxTextureSize; + const DeviceInfo* deviceInfo = DeviceInfo::get(); + LOG_ALWAYS_FATAL_IF(!deviceInfo, "DeviceInfo uninitialized"); return mLayerProperties.mType == LayerType::None - && mPrimitiveFields.mWidth <= maxTextureSize - && mPrimitiveFields.mHeight <= maxTextureSize + && mPrimitiveFields.mWidth <= deviceInfo->maxTextureSize() + && mPrimitiveFields.mHeight <= deviceInfo->maxTextureSize() && (mComputedFields.mNeedLayerForFunctors || (!MathUtils::isZero(mPrimitiveFields.mAlpha) && mPrimitiveFields.mAlpha < 1 |