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

[TextureMapper] Pass size to BitmapTexture constructor #19949

Merged

Conversation

carlosgcampos
Copy link
Contributor

@carlosgcampos carlosgcampos commented Nov 3, 2023

0cf3ba9

[TextureMapper] Pass size to BitmapTexture constructor
https://bugs.webkit.org/show_bug.cgi?id=264157

Reviewed by Fujii Hironori.

This way we can create a BitmapTexture without having to call reset
right after the creation to set the size and flags (that are passed but
ignored in the constructor).

* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::pushTextureToCompositor):
* Source/WebCore/platform/graphics/nicosia/NicosiaImageBufferPipe.cpp:
(Nicosia::NicosiaImageBufferPipeSource::handle):
* Source/WebCore/platform/graphics/texmap/BitmapTexture.cpp:
(WebCore::BitmapTexture::BitmapTexture):
(WebCore::BitmapTexture::reset):
(WebCore::BitmapTexture::updateContents):
(WebCore::BitmapTexture::initializeStencil):
(WebCore::BitmapTexture::initializeDepthBuffer):
(WebCore::BitmapTexture::clearIfNeeded):
(WebCore::BitmapTexture::bindAsSurface):
(WebCore::BitmapTexture::~BitmapTexture):
(WebCore::BitmapTexture::copyFromExternalTexture):
(WebCore::BitmapTexture::didReset): Deleted.
(WebCore::BitmapTexture::isValid const): Deleted.
(WebCore::BitmapTexture::size const): Deleted.
* Source/WebCore/platform/graphics/texmap/BitmapTexture.h:
* Source/WebCore/platform/graphics/texmap/BitmapTexturePool.cpp:
(WebCore::BitmapTexturePool::acquireTexture):
* Source/WebCore/platform/graphics/texmap/TextureMapper.cpp:
(WebCore::TextureMapper::acquireTextureFromPool):
(WebCore::TextureMapper::drawTexture):
(WebCore::TextureMapper::drawTextureCopy):
(WebCore::TextureMapper::drawBlurred):
(WebCore::TextureMapper::applyBlurFilter):
(WebCore::TextureMapper::applyDropShadowFilter):
(WebCore::TextureMapper::applySinglePassFilter):
* Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
(WebCore::TextureMapperPlatformLayerBuffer::clone):
* Source/WebCore/platform/graphics/texmap/TextureMapperTile.cpp:
(WebCore::TextureMapperTile::updateContents):

Canonical link: https://commits.webkit.org/270227@main

2e9ee05

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ mac-wk1 βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  tv-sim
βœ… πŸ›  watch
βœ… πŸ›  πŸ§ͺ unsafe-merge βœ… πŸ›  watch-sim

@carlosgcampos carlosgcampos self-assigned this Nov 3, 2023
@carlosgcampos carlosgcampos added the Platform Portability improvements and other general platform improvements not driven directly by site bugs. label Nov 3, 2023
@carlosgcampos carlosgcampos added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Nov 4, 2023
https://bugs.webkit.org/show_bug.cgi?id=264157

Reviewed by Fujii Hironori.

This way we can create a BitmapTexture without having to call reset
right after the creation to set the size and flags (that are passed but
ignored in the constructor).

* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::pushTextureToCompositor):
* Source/WebCore/platform/graphics/nicosia/NicosiaImageBufferPipe.cpp:
(Nicosia::NicosiaImageBufferPipeSource::handle):
* Source/WebCore/platform/graphics/texmap/BitmapTexture.cpp:
(WebCore::BitmapTexture::BitmapTexture):
(WebCore::BitmapTexture::reset):
(WebCore::BitmapTexture::updateContents):
(WebCore::BitmapTexture::initializeStencil):
(WebCore::BitmapTexture::initializeDepthBuffer):
(WebCore::BitmapTexture::clearIfNeeded):
(WebCore::BitmapTexture::bindAsSurface):
(WebCore::BitmapTexture::~BitmapTexture):
(WebCore::BitmapTexture::copyFromExternalTexture):
(WebCore::BitmapTexture::didReset): Deleted.
(WebCore::BitmapTexture::isValid const): Deleted.
(WebCore::BitmapTexture::size const): Deleted.
* Source/WebCore/platform/graphics/texmap/BitmapTexture.h:
* Source/WebCore/platform/graphics/texmap/BitmapTexturePool.cpp:
(WebCore::BitmapTexturePool::acquireTexture):
* Source/WebCore/platform/graphics/texmap/TextureMapper.cpp:
(WebCore::TextureMapper::acquireTextureFromPool):
(WebCore::TextureMapper::drawTexture):
(WebCore::TextureMapper::drawTextureCopy):
(WebCore::TextureMapper::drawBlurred):
(WebCore::TextureMapper::applyBlurFilter):
(WebCore::TextureMapper::applyDropShadowFilter):
(WebCore::TextureMapper::applySinglePassFilter):
* Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
(WebCore::TextureMapperPlatformLayerBuffer::clone):
* Source/WebCore/platform/graphics/texmap/TextureMapperTile.cpp:
(WebCore::TextureMapperTile::updateContents):

Canonical link: https://commits.webkit.org/270227@main
@webkit-commit-queue
Copy link
Collaborator

Committed 270227@main (0cf3ba9): https://commits.webkit.org/270227@main

Reviewed commits have been landed. Closing PR #19949 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 0cf3ba9 into WebKit:main Nov 4, 2023
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Nov 4, 2023
@carlosgcampos carlosgcampos deleted the texmap-texture-create branch November 4, 2023 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform Portability improvements and other general platform improvements not driven directly by site bugs.
Projects
None yet
4 participants