0

[GPU] Eliminate references to GLImage in the codebase

Doesn't catch all of them - this was just a quick pass, but will catch
more in followup.

Bug: 1310018
Change-Id: If892e93e7f23ce8f9fe8d2586e7c83bd612aa411
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4701366
Commit-Queue: Colin Blundell <blundell@chromium.org>
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1172814}
This commit is contained in:
Colin Blundell
2023-07-20 07:40:43 +00:00
committed by Chromium LUCI CQ
parent b0a5afbff6
commit d5521a1a06
6 changed files with 8 additions and 10 deletions

@ -450,8 +450,7 @@ gpu::SyncToken OneCopyRasterBufferProvider::CopyOnWorkerThread(
query_target = GL_COMMANDS_ISSUED_CHROMIUM;
#endif
// COMMANDS_ISSUED is sufficient for shared memory GpuMemoryBuffers because
// they're uploaded using glTexImage2D (see gl::GLImageMemory::CopyTexImage).
// COMMANDS_ISSUED is sufficient for shared memory GpuMemoryBuffers.
const auto* buffer = staging_buffer->gpu_memory_buffer.get();
if (buffer &&
buffer->GetType() == gfx::GpuMemoryBufferType::SHARED_MEMORY_BUFFER) {

@ -330,7 +330,7 @@ A usage example for two-process synchronization is to sequence access to a
globally shared drawable such as an AHardwareBuffer on Android, where the
writer uses a local GL context and the reader is a command buffer context in
the GPU process. The writer process draws into an AHardwareBuffer-backed
GLImage in the local GL context, then creates a gpu fence to mark the end of
SharedImage in the local GL context, then creates a gpu fence to mark the end of
drawing operations:
```c++

@ -1258,8 +1258,8 @@ void FeatureInfo::InitializeFeatures() {
}
#if BUILDFLAG(IS_APPLE)
// Macs can create GLImages out of AR30 IOSurfaces. iOS based devices seem to
// handle well also.
// Macs can create SharedImages out of AR30 IOSurfaces. iOS based devices seem
// to handle well also.
feature_flags_.chromium_image_ar30 = true;
#elif !BUILDFLAG(IS_WIN)
// TODO(mcasas): connect in Windows, https://crbug.com/803451

@ -580,7 +580,7 @@ AHardwareBufferImageBackingFactory::FormatInfoForSupportedFormat(
GLenum gl_format = GLDataFormat(format);
GLenum gl_type = GLDataType(format);
// GLImageAHardwareBuffer supports internal format GL_RGBA and GL_RGB.
// AHardwareBufferImageBacking supports internal format GL_RGBA and GL_RGB.
if (internal_format != GL_RGBA && internal_format != GL_RGB) {
return info;
}

@ -27,7 +27,7 @@ class GpuDriverBugWorkarounds;
struct GpuPreferences;
// Common constructor and helper functions for
// GLTextureImageBackingFactory and GLImageBackingFactory.
// various GL-based backing factories.
class GPU_GLES2_EXPORT GLCommonImageBackingFactory
: public SharedImageBackingFactory {
public:

@ -14,15 +14,14 @@
namespace gpu {
// Interface through which a representation that has a GL texture calls into its
// GLImage backing.
// backing.
class GLTextureImageRepresentationClient {
public:
virtual bool GLTextureImageRepresentationBeginAccess(bool readonly) = 0;
virtual void GLTextureImageRepresentationEndAccess(bool readonly) = 0;
};
// Representation of a GLTextureImageBacking or GLImageBacking
// as a GL Texture.
// Representation of a GLTextureImageBacking as a GL Texture.
class GLTextureGLCommonRepresentation : public GLTextureImageRepresentation {
public:
GLTextureGLCommonRepresentation(SharedImageManager* manager,