Giter Site home page Giter Site logo

Comments (2)

Guardiola31337 avatar Guardiola31337 commented on May 8, 2024 1

Hey 👋 @tdrhq

Revisiting this one, the solution you suggested wasn't feasible because subclasses of TextureView cannot do their own rendering with the Canvas object so I opted to create both Bitmaps and do a simple merge.
How does that sound? Do you see any drawbacks?

It still remains adding a way to get a Bitmap from SurfaceViews, but at least TextureViews are unblocked.

Happy to know what you think about #71

Thanks a lot!

from screenshot-tests-for-android.

tdrhq avatar tdrhq commented on May 8, 2024

So, I'm not a TextureView/SurfaceView expert, but based on your description you seem to be on the right path, and I'd love to have the eventual fix pulled in.

In this particular case, it looks like the View is drawing over your TextureView, probably because you have a view behind the TextureView which in production will be drawn first, but in your code is drawn after the TextureView.. something like this

  • BackgroundView
    • TitleBar
    • TextureView
    • MapboxImage

The solution will be to draw the TextureView while drawing the rest of the views, which might be tricky (since it's the draw() that dispatches the draw() for the children). Perhaps a ScreenshotSafeTextureView that detects if it's running in a screenshot test and in which case just do the logic you showed inside of its onDraw() method?

from screenshot-tests-for-android.

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.