From 564ca3e2c9ed752f2a9d549ebfb31a78942ecfec Mon Sep 17 00:00:00 2001 From: Stan Iliev Date: Tue, 4 Sep 2018 22:00:00 +0000 Subject: Reland "TextureView Vulkan support and optimized OpenGL draw" Fix an issue with incorrect texture matrix, when there is 90/270 rotation. This happened, because after refactoring SkImage has buffer width/height, instead of layer width/height. This reverts commit a683eb3945320f592f58705c3c31b3c044f4bd72. Bug: 113673613 Test: Ran TextureView CTS and lensblur in camera app Change-Id: If3bcf9cd5195de09fd67a753708568a8e3ca3a9a --- libs/hwui/Layer.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libs/hwui/Layer.cpp') diff --git a/libs/hwui/Layer.cpp b/libs/hwui/Layer.cpp index fb8f0337c95e..f59a2e6ee5c1 100644 --- a/libs/hwui/Layer.cpp +++ b/libs/hwui/Layer.cpp @@ -17,17 +17,17 @@ #include "Layer.h" #include "renderstate/RenderState.h" +#include "utils/Color.h" #include namespace android { namespace uirenderer { -Layer::Layer(RenderState& renderState, Api api, sk_sp colorFilter, int alpha, - SkBlendMode mode) +Layer::Layer(RenderState& renderState, sk_sp colorFilter, int alpha, + SkBlendMode mode) : GpuMemoryTracker(GpuObjectType::Layer) , mRenderState(renderState) - , mApi(api) , mColorFilter(colorFilter) , alpha(alpha) , mode(mode) { @@ -36,6 +36,8 @@ Layer::Layer(RenderState& renderState, Api api, sk_sp colorFilter incStrong(nullptr); buildColorSpaceWithFilter(); renderState.registerLayer(this); + texTransform.setIdentity(); + transform.setIdentity(); } Layer::~Layer() { -- cgit v1.2.3-59-g8ed1b