hardware-acceleration

Using Hardware Layer in Custom View onDraw

 ̄綄美尐妖づ 提交于 2019-12-12 07:59:51
问题 So I'm trying to understand how I can properly use hardware acceleration (when available) in a custom View that is persistently animating. This is the basic premise of my onDraw() : canvas.drawColor(mBackgroundColor); for (Layer layer : mLayers) { canvas.save(); canvas.translate(layer.x, layer.y); //Draw that number of images in a grid, offset by -1 for (int i = -1; i < layer.xCount - 1; i++) { for (int j = -1; j < layer.yCount - 1; j++) { canvas.drawBitmap(layer.bitmap, layer.w * i, layer.h

WebView inside ViewPager or ScrollView - weird rendering bug on Android 3.0+

≯℡__Kan透↙ 提交于 2019-12-12 07:52:34
问题 I have a ViewPager. Every page of the ViewPager is a ScrollView. The ScrollView contains a WebView and several other Views. On Android 2.3 and older everything works fine but on 3.0+ there's a weird rendering issue: When scrolling left / right in the ViewPager, there is also a very subtle rendering issue (which is present in Android 4.0 Gmail app too). 回答1: This might be related to hardwareAcceleration. Try specifically turning it off. You can do this 1) in the application tag inside your

does onDraw in a surfaceview container causes video to be invalidated?

非 Y 不嫁゛ 提交于 2019-12-11 11:23:34
问题 I have a video view . This view is contained inside a custom FrameLayout called VideoStructure , where I can put also a channel logo or things alike. Under normal conditions, the video is hardware accelerated, so the view is (i suppose) really a transparent "black hole", while the video is decoded & rendered by the relevant hardware. My question is, if I override draw() in the Video View's container (the VideoStructure extends FrameLayout in the image) to draw some stuff (ie. the circle in

How to turn off ffmpeg hardware acceleration

心已入冬 提交于 2019-12-11 09:10:53
问题 I have a video player. Written in C++ with Visual Studio, using the ffmpeg 3.2.2 libav libraries. I need to be able to programmatically turn off hardware acceleration of video decompression. I'm not finding much discussion on turning off hardware acceleration; the only info I found is here on StackOverflow: How to turn off Video Acceleration programatically But that solution looks global to the system, not just my application. Are there any ffmpeg flags or APIs that enable turning off

Check when css transforms are executed using hardware acceleration

大憨熊 提交于 2019-12-11 07:43:03
问题 I have been working for a long time on one particular problem to make an svg image that can be dragged and zoomed using gestures on a mobile. I use hammer.js to detect gestures and my current implementation works as follows. When a drag is detected the SVG element is transformed using a (-webkit-)transform with a matrix3d value. Upon completion of the gesture the new viewbox is calculated and the transform is returned to the identity matrix. When a pinch is detected SVG element is zoomed

Is it a good idea to read multiple files at the same time?

荒凉一梦 提交于 2019-12-11 03:37:10
问题 One of our company's server has 32 CPUs, and we have 1000+ very large files to be processed. I'm not sure if it is a good idea to read 32 files at the same time so all cores can perform independent calculations at the same time too. Could anyone briefly explain how hard disk works? If I read 32 files at the same time, would that slow down the reading speed? Thanks! 回答1: The hard disk is traditionally a mechanical data storage device. I'm assuming the server uses mechanical ones, and not the

How to enable Hardware Acceleration on ICS, but disable in Gingerbread?

陌路散爱 提交于 2019-12-11 01:32:25
问题 I want my app to be hw accelerated in ICS, but support of 2.3.3 is still needed too. Can I enable HW acceleration for ICS only? Or I can only drop 2.3.3 support? 回答1: Hardware acceleration was not added until 3.0. This is not an issue. ref: http://developer.android.com/guide/topics/graphics/hardware-accel.html 回答2: on ICS (android 4+) ,GPU acceleration is enabled by default and can be disabled in the manifest. up to gingerbread, including, (up to android 2.3.x) , it's disabled since it's not

Hardware Acceleration supported device list?

孤街醉人 提交于 2019-12-11 00:52:10
问题 i have a question about Hardware Acceleration on Android. Do the device's android API level >= 11 means it must support Hardware Acceleration?? If not, does there exist a way to detect whether the device support Hardware Acceleration? Thanks 回答1: You can enable or desable hardware acceleration from many Level, see this link for more info visit: http://developer.android.com/guide/topics/graphics/hardware-accel.html. From View you can test hardware acceleration using for example: View

Android TextureView and hardware acceleration

亡梦爱人 提交于 2019-12-10 14:35:50
问题 I am trying to implement the example shown on this page. I have tried on three different devices running android 4 and above, and in all cases I get a black screen with this warning: 01-27 20:01:22.683: W/TextureView(4728): A TextureView or a subclass can only be used with hardware acceleration enabled. I have turned on hardware acceleration in the application manifest: <application android:hardwareAccelerated="true" [etc...] But the following check my custom view's onAttachedToWindow method

Multi-Threaded Video Decoder Leaks Memory

独自空忆成欢 提交于 2019-12-10 12:18:43
问题 My intention is to create a relatively simple video playback system to be used in a larger program that I am working on. Relevant code to the video decoder is here. The best I have been able to do so far is narrow down the memory leak to this section of code (or rather I have not noticed any memory leaks occurring when video is not used). This is probably a very broad question how ever I am unsure of the scope of the issue I am having and as such of how to word my question. What I want to