0

[//gpu] Eliminate remaining GLImage references in comments

Bug: 1310018
Change-Id: I686d9cbe3d831188228265a49fa3f5cfe125f6a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4705285
Commit-Queue: Colin Blundell <blundell@chromium.org>
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1172961}
This commit is contained in:
Colin Blundell
2023-07-20 14:57:29 +00:00
committed by Chromium LUCI CQ
parent 19896aa911
commit 5007feef43
6 changed files with 15 additions and 15 deletions

@ -32,10 +32,9 @@ include, but are not limited to:
IOSurfaces on Mac, or CPU side shared memory). Because of their cross IOSurfaces on Mac, or CPU side shared memory). Because of their cross
process use case, these objects will almost always be shared between a process use case, these objects will almost always be shared between a
renderer or browser process and the GPU process. renderer or browser process and the GPU process.
* **GLImages**: GLImages are a platform-independent abstraction around GPU * **SharedImages**: SharedImages are a platform-independent abstraction around GPU
memory, similar to GPU Memory Buffers. In many cases, GLImages are created memory, similar to GPU Memory Buffers. In many cases, SharedImages are created
from GPUMemoryBuffers. The primary difference is that GLImages are designed from GPUMemoryBuffers.
to be bound to an OpenGL texture using the image extension.
GPU Memory can be found across a number of different processes, in a few GPU Memory can be found across a number of different processes, in a few
different categories. different categories.
@ -80,7 +79,7 @@ _effective size_ is 0:
![Effective size of zero][non-owner-size] ![Effective size of zero][non-owner-size]
Other types, such as GPUMemoryBuffers and GLImages have similar sharing Other types, such as GPUMemoryBuffers and SharedImages have similar sharing
patterns. patterns.
When trying to get an overview of the absolute memory usage tied to the GPU, When trying to get an overview of the absolute memory usage tied to the GPU,

@ -12,8 +12,7 @@ class GrPromiseImageTexture;
namespace gpu { namespace gpu {
// Implementation of SharedImageBacking that creates a GL Texture that is not // Implementation of SharedImageBacking that uses GL Textures as storage.
// backed by a GLImage.
class GLTextureImageBacking : public ClearTrackingSharedImageBacking { class GLTextureImageBacking : public ClearTrackingSharedImageBacking {
public: public:
static bool SupportsPixelUploadWithFormat(viz::SharedImageFormat format); static bool SupportsPixelUploadWithFormat(viz::SharedImageFormat format);

@ -69,7 +69,7 @@ class ScopedUnpackState {
absl::optional<gl::ScopedPixelStore> unpack_lsb_first_; absl::optional<gl::ScopedPixelStore> unpack_lsb_first_;
}; };
// Common helper functions for GLTextureImageBacking and GLImageBacking. // Common helper functions for various backings.
class GPU_GLES2_EXPORT GLTextureImageBackingHelper { class GPU_GLES2_EXPORT GLTextureImageBackingHelper {
public: public:
// At destriction time, restore `target`'s binding as of construction time. If // At destriction time, restore `target`'s binding as of construction time. If

@ -1238,8 +1238,8 @@ void IOSurfaceImageBacking::IOSurfaceBackingEGLStateEndAccess(
// to be copied to the internal texture via a Bind() when the GPU starts a // to be copied to the internal texture via a Bind() when the GPU starts a
// subsequent read. Note also that this logic assumes that writes are // subsequent read. Note also that this logic assumes that writes are
// serialized with respect to reads (so that the end of a write always // serialized with respect to reads (so that the end of a write always
// triggers a release and copy). By design, GLImageBackingFactory enforces // triggers a release and copy). By design, IOSurfaceImageBackingFactory
// this property for this use case. // enforces this property for this use case.
bool needs_sync_for_swangle = bool needs_sync_for_swangle =
(gl::GetANGLEImplementation() == gl::ANGLEImplementation::kSwiftShader && (gl::GetANGLEImplementation() == gl::ANGLEImplementation::kSwiftShader &&
(num_ongoing_read_accesses_ == 0)); (num_ongoing_read_accesses_ == 0));
@ -1247,11 +1247,12 @@ void IOSurfaceImageBacking::IOSurfaceBackingEGLStateEndAccess(
// Similarly, when ANGLE's metal backend is used, we have to signal a call to // Similarly, when ANGLE's metal backend is used, we have to signal a call to
// waitUntilScheduled() using the same method on EndAccess to ensure IOSurface // waitUntilScheduled() using the same method on EndAccess to ensure IOSurface
// synchronization. In this case, it is sufficient to release the image at the // synchronization. In this case, it is sufficient to release the image at the
// end of a write. As above, GLImageBackingFactory enforces serialization of // end of a write. As above, IOSurfaceImageBackingFactory enforces
// reads and writes for this use case. // serialization of reads and writes for this use case.
// TODO(https://anglebug.com/7626): Enable on Metal only when // TODO(https://anglebug.com/7626): Enable on Metal only when
// CPU_READ or SCANOUT is specified. When doing so, adjust the conditions for // CPU_READ or SCANOUT is specified. When doing so, adjust the conditions for
// disallowing concurrent read/write in GLImageBackingFactory as suitable. // disallowing concurrent read/write in IOSurfaceImageBackingFactory as
// suitable.
bool needs_sync_for_metal = bool needs_sync_for_metal =
(gl::GetANGLEImplementation() == gl::ANGLEImplementation::kMetal && (gl::GetANGLEImplementation() == gl::ANGLEImplementation::kMetal &&
!readonly); !readonly);

@ -20,8 +20,7 @@ namespace gpu {
class TextureOwner; class TextureOwner;
class TextureBase; class TextureBase;
// This class is a specialized GLImage that lets SharedImageVideo draw video // This class lets SharedImageVideo draw video frames.
// frames.
class GPU_GLES2_EXPORT StreamTextureSharedImageInterface class GPU_GLES2_EXPORT StreamTextureSharedImageInterface
: public base::RefCounted<StreamTextureSharedImageInterface> { : public base::RefCounted<StreamTextureSharedImageInterface> {
public: public:

@ -585,6 +585,8 @@ bool IsAImageReaderEnabled() {
// Device Hammer_Energy_2 seems to be very crash with image reader during // Device Hammer_Energy_2 seems to be very crash with image reader during
// gl::GLImageEGL::BindTexImage(). Disable image reader on that device for // gl::GLImageEGL::BindTexImage(). Disable image reader on that device for
// now. crbug.com/1323921 // now. crbug.com/1323921
// TODO(crbug.com/1323921): Can we revisit this now that GLImage no longer
// exists?
if (IsDeviceBlocked(base::android::BuildInfo::GetInstance()->device(), if (IsDeviceBlocked(base::android::BuildInfo::GetInstance()->device(),
"Hammer_Energy_2")) { "Hammer_Energy_2")) {
return false; return false;