hmin's Forum Posts

  • Anyways, does that mean that I basically can't use Crosswalk without Intel XDK because it doesn't fully support Construct 2 [with plugins and all]?

    No. Intel XDK can help build your app for PhoneGap API support, and you can also use Crosswalk directly by use of make_apk.py packaging tools if PhoneGap API is NOT used. Generally, Crosswalk also fully support Contruct2 library and its plugins (both of them are pure JS libraries).

    On another note, you say that the next XDK release might give us an option to turn off the blacklist, but you also said that doing so may lead to crashes or even brick the phone. Maybe I'm naive but wouldn't a better solution be to manually remove specific phones from the blacklist, such as the mentioned Galaxy S3 and S4? Turning off the whole blacklist seems very brute-force.

    Don't over-worry about that. The potential crashes caused by a buggy gfx driver is somewhat a kind of software level error. You should test your app carefully on a backlisted device to make sure it won't trigger such an error.

    See my above update:

    EDIT: Chromium introduces the mechanism of gpu blacklist for those devices which don't have a good enough passrate in WebGL conformance test. This mean those devices may trigger some bug or limited feature support in the gfx driver in some condition although most of time they work well.

  • kbm

    its really funny! i have all your problem.

    I don't know how to what hmins says

    and i have Galaxy S2. i cant run webgl with crosswalk. and i have problem with cjs.

    when i export with cjs, my game dose not work in my phone. but in note 10.1 2012 edition it works fine. is it because its ram?

    and why crosswalk get lower ram? is it slower than cjs?

    if i enable webgl, is it possible that my game dosent run in my phone because of more ram needing?

    and is it harm for phone? why they make this blacklist?

    The crosswalk and cjs (canvas+) have different implementations for webgl support. I don't think the failure running your game app on Note 10.1 was caused by memory consumption, maybe a buggy gfx driver to support some feature required by webgl. You can capture some logs by adb logcat to see if there is some suspicious error message.

  • Hi, I read through all your posts, here I'd like to give some clarifications and background about gpu blacklist issue.

    * Why not ignore gpu blacklist in Crosswalk now?

    The gpu blacklist was originally ignored by default in Crosswalk. However, about several months, some C2 users reported WebGL running with Crosswalk gets crash on their device due to the buggy gfx driver. Such a crash seems not so good, and Crosswalk is not ignore the blacklist, instead it lets web developer decide if it is on or off via command line options.

    EDIT: Chromium introduces the mechanism of gpu blacklist for those devices which don't have a good enough passrate in WebGL conformance test. This mean those devices may trigger some bug or limited feature support in the gfx driver in some condition although most of time they work well.

    * How to append the command line option to ignore gpu blacklist?

    I am sorry to confuse you with a different context. The approach I mentioned above is in the context of using make_apk.py directly instead of Intel XDK build. With XDK build, there is no way for web developer to add an individual file in assets folder. XDK is working on adding such an option to ignore gpu blacklist for web developer.

    * What is the relationship between XDK build and open source Crosswalk?

    Crosswalk is a HTML5 app runtime to run web app. It supports the HTML5 standard API and features without phonegap APIs and plugins support. XDK build uses a Crosswalk variant as the backend engine. This Crosswalk variant integrates phonegap APIs and plugins based on the open source Crosswalk project. For simplicity, we call both of them as Crosswalk.

    So if you web app depends on phonegap API or plugin, you can't build a workable web app by use of make_apk.py. The make_apk.py is only useful for 'pure' HTML5 app.

    [BTW: since I have no enough reputations to paste URL and pm some of you. Sorry for no reply if you PMed me:)]

  • Hello hmin I was wondering about a feature In-app purchase in Google Play using Crosswalk, I was waiting to release a game which is freemium but I can't release it without IAP feature. I've been waiting for long time.

    When will we have this implemented feature? Thanks

    Joannesalfa, Maybe the phonegap plugin for IAP would help you. Search AndroidInAppBilling in github.com to check if it meets your requirements. You can follow the instruction for phonegap plugin integration to add it into your app.

  • hmin

    I do get "server could not be reached" application error on start up sometimes. it was something along the lines of //index.html or something like that, searching for the file. This has been mentioned before in this thread.

    GameThirsty, May I confirm 3 things with you? Thanks.

    1. Is the error message saying "The connection to the server was unsuccessful"?

    2. Did you set the value of LoadUrlTimeoutValue in config.xml file? and what is the value?

    3. Would the error happen each time or sometimes when launching app?

  • Hi hmin, I'm currently in the process of moving over from CJS to Crosswalk, and I came across this issue. What is the resolution process for this bug? Is this something that you guys deal with on your side, or is WebGL just never going to work with Crosswalk on a Galaxy S3 due to a driver bug that's beyond your control?

    I understand that blacklist ignoring is something that's coming up soon in Intel XDK. Will it be safe to simply ignore blacklistsed GPUs to ensure WebGL works? I've been testing on my GS3 using Cocoon for some time now (with WebGL enabled), and it's always behaved itself fine.

    GeometriX, currently Crosswalk disables WebGL internally by default for a buggy driver , which means WebGL would never works unless gpu blacklist is ignored .

    If you want to ignore gpu blacklist by manual, from Crosswalk 6, it allows to add app-specific command line options by adding a new asset file to your apk. You can add <APP_DIR>/assets/xwalk-command-line into your apk with the following content:

    xwalk --ignore-gpu-blacklist[/code:3oahbykf]
    and then rebuild your apk.
  • Am I the only one who had an huge performance drop with XWalk 6?

    Knifegrinder, Did you mean the canvas performance? If so, lots of previous threads are discussing it due to gpu blacklist issue.

  • I've just tested with High DPI in C2 and compiled with Intel XDK using the canary beta option. It broke my WebGL effect "Glass" (from C2's default effects), it works fine with High DPI is set to No in C2. Quite strange.

    All it is is a 128 x 128 white sprite with Glass effect, set to grow by 20 pixels height and width every frame.

    The phenomenon I observed is, the 'Glass' effect is broken on a 256x256 sprite with nothing is painted for the sprite, regardless of whether high dpi is on or not. But it works if WebGL is off by C2, says canvas 2d renderer is used instead.

    As for the High DPI setting itself, it works at making the image much better quality (same as CocoonJS). There is a noticeable drop in performance, I am doing more tests now to give you an exact performance loss figure.

    Edit: Seems to go from an average fps of 45 to 40 with the DPI settings but on high DPI, it has more drops down to 30 fps. CocoonJS is most of the time 60 fps, with dips to 50. This is on my LG G-Pad with Snapdragon S600.

    Really thanks for your update, and I think it is very important for Crosswalk. As I know, CJS has a special native implementation for canvas, called direct canvas (canvas+), which shortcuts a general rendering pipeline for web page layout and rendering. The thing I am interesting in is, the performance of high dpi is heavily impacted, which is beyond my expectation. For such performance issue, I am afraid it is not easy to reproduce without your case. So would you mind to share your capx file to me? I'd like to help profile and optimize it, from Crosswalk internal and app level. Thanks in advance.

  • hmin

    I prefer not to show people my project, it is my main project. Maybe it is just my phone, it is getting rather old and the battery is starting to go with it.

    On another note, I did notice that the app's (no matter if its a plain new project or my main project), sometimes close for no reason when I exit the app and re open it. (not exiting the app entire, just closing it using home button, and opening it up later, or sometimes if i keep the app running and just turn off the phones screen, and turn it back on, app crashes and restarts.) is this something you are aware of as well?

    GameThirsty, the issue your reported is by-design for all apps running on Android system. On Android, each app has its lifecycle, the system may terminate an background app to free resource if the Android system is running into low memory. An app would be switched to background if you press home button or back button or turn off the screen. This is why you find the app exits and restarts when re-opening it again.

    Regarding to the crashes, did you have an evidence? for example, an error dialog or adb logcat error message.

  • Just from your own experience, which option results in the best image quality or performance (or they are the same, no difference)? Enabling high DPI in C2 or using the command line option with XWalk?

    , both of the two ways (enabling high dpi in C2 and using cmd line option with XWalk) are the same in image quality and performance. They are two different ways to let Crosswalk engine use the right devicePixelRatio when painting canvas.

  • Its noted that in C2, enabling high DPI will reduce performance in crosswalk compiled games. Does the forcing via command line to 1 density work differently so that it doesn't reduce performance?

    Either way its good to know the blurry image issue can be easily resolved. Thanks!

    , may I know how much performance impact in high DPI mode? According to my observation, the way by command line option is almost the same as by C2 configuration for high DPI, so they should be at the same performance level.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I managed to sort my issue with regards to signing my apk and updating an older CJS google play store listing.

    I also get the blurry image issue even on small images. I have to set the high DPI to yes to make smooth graphics for my app. I believe this will give a performance issue on most phones though In CJS all my graphics were fine with that turned off.

    , Mayfly, I managed to set up the test case to reproduce the blurry image issue, and work out a solution to resolve it for Crosswalk.

    As mentioned by Mayfly, the image would NOT become blurry if the high DPI is turned on by Contruct2. That is true because, on a high dpi device, the display density is always greater than 1, for example, it is 2.0 on Google Nexus 7, and so window.devicePixelRatio in Crosswalk engine is also set to 2.0. The value of window.devicePixelRatio will be used to draw canvas by C2 runtime if high dpi mode is turned on, to get a more sharp image. In case of high dpi mode is turned off, C2 runtime tries to draw the canvas with the default value 1.0 on a high-dpi screen, as a result, the final image output becomes blurry since the pixels drawn by C2 runtime would be hard-scaled to fit the high-dpi screen dimension.

    The solution for Crosswalk is simple, you can pass --force-device-scale-factor=1.0 command line option to Crosswalk engine in assets/xwalk-command-line. Note the command line file is supported from Crosswalk 6.

    With the above command line option, the Crosswalk engine force to set the device scale factor to 1.0, and so window.devicePixelRatio is 1.0 accordingly no matter the value of the device density. In this case, when C2 runtime would draw the canvas which can fit the screen dimension without hard-scaled.

    The memory consumption is decided by the size of canvas. In case of high dpi mode is enabled, for example, on Nexus7 with 1920x1200 resolution, the canvas size is 1920x1080, while in case of high dpi mode is disabled, the canvas size is 960x540.

    Another way to resolve this issue is to enable high dpi mode in C2. Don't worry, it won't consume more memory than CJS. The reason is, CJS has its own implementation for canvas, it internally enables high dpi mode for canvas drawing on a high dpi device regardless of whether it is enabled in Contruct2 project setting.

  • Has anyone noticed that the battery usage is VERY high using Crosswalk, even when the app is exited and paused in the background?

    Thanks for your reporting this issue. Logically, it would not be very high in power consumption since we already have special considerations and handling for power saving, e.g. JS timer pause when switching to background, resource releasing when app is exited.

    Could you please upload your workload so that we can analyze further?

  • , Mayfly, I still failed to reproduce it with some experiments.

    , I agree with your analysis for the blurry image caused by scaling. If I could reproduce it, I think I can fix in XDK/Crosswalk, at least to provide a option for developer to decide if auto-scaling is needed.

    Would you please paste a piece of code to show how do you use the image in HTML file? for example, if viewport meta tag is used, and the css applied to image, so that I can reproduce it easily and correctly.

  • Hmm, in my debugging text it says "canvas2d" as renderer, in both stable and beta builds but the stable has a better framerate(55 fps vs 32 fps).

    The intel app preview the app is using the "WebGL" renderer.

    Zhiqiang

    I was wondering why the performance is worst in Crosswalk 5, even when both builds are running with canvas2d renderer.

    Thanks.

    Hi, cesisco, even if canvas2d renderer is used, the performance may be still bad if the HW acceleration for canvas2d is blacklisted on your device. Chromium will also blacklist the accelerated canvas2d on some device, e.g. the older Qualcomm Adreno device, see the link crbug.com/161575. To confirm the gpu feature status on your device, I suggest to use Chrome for Android for help, you can type about://gpu to check the output for Canvas category.