Disable blending for opaque TextureView

Opaque TextureView (set by TextureView.setOpaque(true), should
draw with SRC blending, which in practice disables GL
blending.

Test: Ran Naver app, which is using opaque TextureView
Bug: 113845024
Change-Id: I5daa455a72b0ded50d6f9578f3b8a8701532f9d4
diff --git a/libs/hwui/Layer.cpp b/libs/hwui/Layer.cpp
index cc95051..32aaa54 100644
--- a/libs/hwui/Layer.cpp
+++ b/libs/hwui/Layer.cpp
@@ -77,5 +77,13 @@
     mRenderState.postDecStrong(this);
 }
 
+SkBlendMode Layer::getMode() const {
+    if (mBlend || mode != SkBlendMode::kSrcOver) {
+        return mode;
+    } else {
+        return SkBlendMode::kSrc;
+    }
+}
+
 };  // namespace uirenderer
 };  // namespace android
diff --git a/libs/hwui/Layer.h b/libs/hwui/Layer.h
index 6f07a43..e4f96e9 100644
--- a/libs/hwui/Layer.h
+++ b/libs/hwui/Layer.h
@@ -67,7 +67,7 @@
 
     inline int getAlpha() const { return alpha; }
 
-    inline SkBlendMode getMode() const { return mode; }
+    SkBlendMode getMode() const;
 
     inline SkColorFilter* getColorFilter() const { return mColorFilter.get(); }