Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add channel_index in ExternalImageHandler callback, ExternalImageData and UpdateForExternalBuffer #1125

Merged

Conversation

JerryShih
Copy link
Contributor

@JerryShih JerryShih commented Apr 17, 2017

This change is Reviewable

@kvark
Copy link
Member

kvark commented Apr 17, 2017

I appreciate the cleanup, thank you! Please squash a bit to proceed.

Also remove the release() interface in ExternalImageHandler.
The external image life time checking could be replaced by comparing the epoch
id of RenderNotifier. So, the release() interface is not necessary now.
… and UpdateForExternalBuffer.

In some video image formats(e.g. yuv or nv12), we could have more than one
channel data for that video image. Currently, we use different external image id
for each channel data. This patch add one additional channel_index data member
in ExternalImageData. Then, we could use this channel_index to select the
specific channel data with the same ExternalImageId.

Example:
Add 2 chanel image into WR.
api.add_image(...
              ImageData::External(ExternalImageData {
                                    id: ExternalImageId(external_image_id),
                                    channel_index: 0,
                                    ...
                                  }),
              ...);
api.add_image(...
              ImageData::External(ExternalImageData {
                                    id: ExternalImageId(external_image_id),
                                    channel_index: 1,
                                    ...
                                  }),
              ...);
@JerryShih JerryShih force-pushed the ext-image-with-channel-index-pull-request branch from 95f0e56 to d733af2 Compare April 18, 2017 03:49
@JerryShih
Copy link
Contributor Author

@kvark
Here are the squashed commits.

|Cargo update webrender|
webrender 0.34.0
@kvark
Copy link
Member

kvark commented Apr 18, 2017

Thank you!
@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit 3ae6235 has been approved by kvark

@bors-servo
Copy link
Contributor

⌛ Testing commit 3ae6235 with merge 9537371...

bors-servo pushed a commit that referenced this pull request Apr 18, 2017
…uest, r=kvark

Add channel_index in ExternalImageHandler callback, ExternalImageData and UpdateForExternalBuffer

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1125)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - status-travis
Approved by: kvark
Pushing 9537371 to master...

@bors-servo bors-servo merged commit 3ae6235 into servo:master Apr 18, 2017
bors-servo pushed a commit that referenced this pull request Apr 18, 2017
… r=kvark

Add GL_TEXTURE_EXTERNAL_OES texture target

@kvark @glennw
r?

Please only review the patch "Add TextureExternalHandle in ExternalImageType and External in TextureTarget". The remaining patches will be handled at #1125

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/1132)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants