Coder Social home page Coder Social logo

Low FPS about chromeview HOT 6 OPEN

pwnall avatar pwnall commented on July 19, 2024
Low FPS

from chromeview.

Comments (6)

pwnall avatar pwnall commented on July 19, 2024

@ekelokorpi That's awesome news! 👍

A new build of ChromeView might improve the performance. Sadly, there were some changes in the code that require me to change the building and packaging, so it might take a while to get a new build.

from chromeview.

davisford avatar davisford commented on July 19, 2024

@ekelokorpi are you sure you're using hardware gpu acceleration?

from chromeview.

ekelokorpi avatar ekelokorpi commented on July 19, 2024

@davisford how can i check that?

from chromeview.

davisford avatar davisford commented on July 19, 2024

@ekelokorpi good question -- I'm fairly new to Android internals myself. I'm not 100% sure if there's something in settings that will tell you this. I do think you could resolve it via an API, though. For example, see this line in AwContents.java:

https://code.google.com/p/chromium/codesearch#chromium/src/android_webview/java/src/org/chromium/android_webview/AwContents.java&sq=package:chromium&type=cs&l=646

It calls the native function: canvas.isHardwareAccelerated(). I bet you could add a line of code to that file like:

Log.w(TAG, "Is hardware acceleration enabled? " + canvas.isHardwareAccelerated());  

And you should have your answer. I'm sure there's probably a better way to deduce this, but I don't know right now without spending more time with the platform. I know in the emulator, you can choose to explicitly turn this on/off, but not sure how to enable / disable on real hardware.

More info from the Android docs

from chromeview.

ekelokorpi avatar ekelokorpi commented on July 19, 2024

Hmm i tried that and it returns false. So it's not using hardware acceleration.

Any idea how to fix it?

edit: i got it on by adding android:hardwareAccelerated="true" to manifest, but it's still 10 fps :(

from chromeview.

geleto avatar geleto commented on July 19, 2024

I tried with a newer (August 6) build of Chrome as pwnall suggested, which can be found here:
https://github.com/davisford/chromeview
But this did not help

It seems that the accelerated canvas is disabled by default: https://code.google.com/p/chromium/codesearch#chromium/src/webkit/common/webpreferences.cc&q=accelerated_2d_canvas_enabled%20&sq=package:chromium&l=70&type=cs

Search the sources for accelerated_2d_canvas_enabled , setAccelerated2dCanvasEnabled .
Is there a way to set this without recompiling webkit?

Edit: also found this: https://code.google.com/p/chromium/codesearch#chromium/src/android_webview/lib/main/aw_main_delegate.cc&q=kDisableAccelerated2dCanvas&sq=package:chromium&type=cs&l=65

from chromeview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.