SkiaRE: Use RGB_888x for isOpaque

Bug: 181130369
Test: manual
Test: librenderengine_test

The old method of blending with black doesn't work if we need to do
color conversion. The Skia pipeline premultiplies the shader prior to
blending. We can claim the image is premul to avoid that, but if we need
to do color conversion, we'll unpremultiply and convert, leading to the
current bug.

Instead, use SkColorTypes that ignore the alpha bits where possible. At
the moment, this only works for kRGBA_8888_SkColorType. There are two
other input types that we might see: kRGBA_1010102_SkColorType and
kRGBA_F16_SkColorType. While the former has an "ignore alpha" version,
it is not yet supported as a source to the GPU. The latter does not yet
have an "ignore alpha" version. Adding support for both is tracked in
skbug.com/12048. In the meantime, keep the old behavior for the
unsupported types, rather than breaking them even worse.

Change-Id: I7b6c4ff92a39a5e1c510a0a91117f55d7ce5115f
diff --git a/libs/renderengine/skia/AutoBackendTexture.h b/libs/renderengine/skia/AutoBackendTexture.h
index 3133de6..a9e8430 100644
--- a/libs/renderengine/skia/AutoBackendTexture.h
+++ b/libs/renderengine/skia/AutoBackendTexture.h
@@ -65,6 +65,8 @@
             return mTexture->getOrCreateSurface(dataspace, context);
         }
 
+        SkColorType colorType() const { return mTexture->mColorType; }
+
         DISALLOW_COPY_AND_ASSIGN(LocalRef);
 
     private: