CSS “硬件加速”指的是什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12355856/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 20:09:09  来源:igfitidea点击:

What does "hardware acceleration" refer to?

flashcssvideowebhardware-acceleration

提问by wwaawaw

I've seen it used in reference mostly to animations and other visual effects. Fancy CSS3 stuff, flash video playback, things like that. I don't know if I've ever seen it used when it didn't have anything to do with web browsers, though that could just be a result of me not reading any technical literature that doesn't have to do with web development.

我已经看到它主要用于动画和其他视觉效果。花哨的 CSS3 东西,Flash 视频播放,诸如此类。我不知道我是否见过它在与 Web 浏览器无关的情况下使用过,尽管这可能只是因为我没有阅读任何与 Web 开发无关的技术文献.

回答by Paul Collingwood

It's when you have hardware designed to accelerate a specific function.

当您拥有旨在加速特定功能的硬件时。

So, for example, when you decode or encode video you do it on the CPU. Some video cards allow you to do this on their GPU instead, so you now have "hardware accelerated video decoding".

因此,例如,当您解码或编码视频时,您是在 CPU 上进行的。某些显卡允许您在其 GPU 上执行此操作,因此您现在拥有“硬件加速视频解码”。

So two users, one with hardware acceleration and one without will see more or less the same visuals, but the one without may experience less frames or resolution etc. Or it might just mean a different part of the computer gets hotter instead and it looks the same on both.

因此,两个用户,一个有硬件加速,一个没有硬件加速,将看到或多或少相同的视觉效果,但没有的用户可能会遇到更少的帧数或分辨率等。或者这可能只是意味着计算机的不同部分变得更热,看起来两者相同。

Another example, you can use a 3D package and you might get 30 fps. If you add a posh graphics card that the 3D package can use directly you can now get 60 fps. The hardware has accelerated the process!

另一个例子,你可以使用 3D 包,你可能会得到 30 fps。如果您添加 3D 包可以直接使用的豪华显卡,您现在可以获得 60 fps。硬件加速了这个过程!

回答by ryan0

It means the graphical rendering is done on dedicated hardware (your GPU / graphics card) rather than your CPU. Hardware acceleration generally produces more fluid animation.

这意味着图形渲染是在专用硬件(您的 GPU / 显卡)而不是您的 CPU 上完成的。硬件加速通常会产生更流畅的动画。

回答by Tomek Bartkowiak

make sure that the browser view is set to 100%. In Chrome on iOs you can do it by pressing cmd + 0.

确保浏览器视图设置为 100%。在 iO 上的 Chrome 中,您可以通过按 cmd + 0 来完成。

I noticed that if the browser view is scaled down or up the png images with transparencies will be distorted in flash animation.

我注意到如果浏览器视图缩小或放大,带有透明度的 png 图像将在 Flash 动画中失真。