1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Android: disable hardware acceleration on ComponentPeerView level rather than application level to allow embedded views to use hardware acceleration if needed.

This circumvents the issue in web view scrolling that happens only when using software rendering (a potential bug in chromium).
This commit is contained in:
Lukasz Kozakiewicz 2017-11-16 15:46:21 +00:00
parent 763392ac4f
commit 87831624cb
3 changed files with 25 additions and 2 deletions

View file

@ -106,8 +106,11 @@ private:
{
jobject peerView = (jobject) currentPeer->getNativeHandle();
auto* env = getEnv();
auto parentView = env->CallObjectMethod (peerView, AndroidView.getParent);
// Assuming a parent is always of ViewGroup type
getEnv()->CallVoidMethod (peerView, AndroidViewGroup.addView, view.get());
env->CallVoidMethod (parentView, AndroidViewGroup.addView, view.get());
componentMovedOrResized (false, false);
}