summaryrefslogtreecommitdiff
path: root/libs/hwui/Layer.cpp
diff options
context:
space:
mode:
authorStan Iliev <stani@google.com>2018-09-04 22:00:00 +0000
committerStan Iliev <stani@google.com>2018-09-05 01:58:34 +0000
commit564ca3e2c9ed752f2a9d549ebfb31a78942ecfec (patch)
treef5a88d6ac251afadbbcc602047c2d901bf8cac55 /libs/hwui/Layer.cpp
parent73855d407137e670b1f836ec15b21bd7a4b1a187 (diff)
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
Diffstat (limited to 'libs/hwui/Layer.cpp')
-rw-r--r--libs/hwui/Layer.cpp8
1 files changed, 5 insertions, 3 deletions
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 <SkToSRGBColorFilter.h>
namespace android {
namespace uirenderer {
-Layer::Layer(RenderState& renderState, Api api, sk_sp<SkColorFilter> colorFilter, int alpha,
- SkBlendMode mode)
+Layer::Layer(RenderState& renderState, sk_sp<SkColorFilter> 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<SkColorFilter> colorFilter
incStrong(nullptr);
buildColorSpaceWithFilter();
renderState.registerLayer(this);
+ texTransform.setIdentity();
+ transform.setIdentity();
}
Layer::~Layer() {