手机安卓HTML5硬件加速 - 帆布 [英] Phone Android HTML5 Hardware Acceleration - Canvas

查看:173
本文介绍了手机安卓HTML5硬件加速 - 帆布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个奇怪的问题。当我启用了硬件加速,如果我画到画布元素,无论是在画布上绘制,将重新吸引到页面的顶部。

I am having a strange issue. When I have hardware acceleration enabled, if I am drawing to a canvas element, whatever is drawn on the canvas, will be re-drawn to the top of the page.

如果我关闭硬件加速,这个问题就不会发生。

If I turn off Hardware Acceleration, this issue does not occur.

我只有亲自测试它在Android 4.1.1,但我对我们的用户之一,前注意到了这个问题一段时间以前,我不能复制(他们是在Android 3+ ATLEAST)

I have only personally tested it on Android 4.1.1, but I've noticed this issue before on one of our users awhile ago that I couldn't replicate (They were on Android 3+ atleast)

我不能准确地抓住截图(也不太清楚如何做到这一点在Android),但我会努力打破的过程。

I can't exactly grab a screenshot (not too sure how to do that on Android), but I will try break down the process.

硬件加速启用

  1. 在用户填写平常的细节。
  2. 在用户滚动到页面底部,引出canvas元素上签名。
  3. 如果用户忘记东西的网页,滚动顶部页面顶部
  4. 在可视的错误发生时,他们制定了签名出现在页面

但是,没有硬件加速,第4步不会发生。有什么我应该做的,HTML5的Canvas?

However with no hardware accel, step 4 does not occur. Is there something I'm supposed to do to the HTML5 Canvas?

我不知道我需要在这里传递什么样的信息 - 它似乎发生在三星,宏达电和谷歌Nexus手机/平板电脑所以它的一个一致的错误

I'm not sure what information I need to pass over here - it seems to occur on Samsung, HTC and Google Nexus Phones/Tablets so its a consistant bug.

我试图摸索,但我总是最终获得游戏开发线程或者喜欢。

I tried searching around, but I always end up getting Game Development threads or the likes.

我真的想有硬件加速启用,这是发生于它的唯一问题 - 的效果进行收益SOOOO令人难以置信

I really would like to have Hardware Accel enabled, this is the only issue that occurs from it - the peformance gains are soooo incredible

推荐答案

在Android上的复制HTML5的画布问题已emeerged 4.1.1版本,它不是固定在最新的4.2呢。

The duplicated HTML5 canvas issue in Android has emeerged with version 4.1.1 and it's not fixed in the latest 4.2 yet.

解决的办法是,父母HTML元素到画布的溢出:隐藏溢出:滚动

The solution is that none of the parents HTML elements to the canvas will have overflow:hidden or overflow:scroll

这篇关于手机安卓HTML5硬件加速 - 帆布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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