Android的clipPath相当于硬件加速浏览 [英] Android clipPath equivalent for hardware accelerated View

查看:248
本文介绍了Android的clipPath相当于硬件加速浏览的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序,它仍然是软件渲染的唯一部分是一个视图渲染,我需要画一个圆位图。我使用clipPath剪辑,我需要渲染的圆形位图。

The only part of my app that is still software rendered is the rendering of one view where I need to draw a round bitmap. I'm using clipPath to clip the bitmap that I need to render to the round shape.

据我所知,clipPath不是硬件加速,但我在寻找一种算法,让我使用硬件加速来提供相应的功能。

I understand that clipPath is not hardware accelerated, but I am looking for an algorithm that would allow me to provide the equivalent functionality using hardware acceleration.

我特别需要创建一个源位图的圆形裁剪区域,并有呈现给我的画布。

Specifically I need to create a round clipping region of a source bitmap and have that rendered to my canvas.

推荐答案

如果你必须使用clipPath你可以关闭硬件加速如下图所示。

If you have to use clipPath you could shut down the hardware acceleration as below.

<application
    android:label="@string/application_name"
    android:hardwareAccelerated="false">

而且你还可以控制中的应用,活动窗口和视图层硬件加速。详细信息描述了在Android开发网站这个硬件加速的文章

这篇关于Android的clipPath相当于硬件加速浏览的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆