Skip to content

Pixel copy to flip texture is too slow, WebPDecoderOptions.flip should be used, but how? #21

Open
@shunia

Description

@shunia

Pixel copy is blocking the main thread and consumes too much time, which is not acceptable.

I tried with one of our webp animation file, and the overall performance is something like:

libwebp decode: 230ms
flip upside down by pixel copy: 735ms

And because these all happened in the main thread, it freeze the app for almost 1 secend.

And then I found this in project libwebp inside the 1.0.0 tag, which is the exact version used by unity.webp:

// Decoding options
struct WebPDecoderOptions {
  ...
  int flip;                           // flip output vertically
  ...
};

This flip option has been implemented to solve the upside down problem, but how could I use this option? Please help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions