[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:

committed by
Chromium LUCI CQ

parent
b0a5afbff6
commit
d5521a1a06
cc/raster
docs/design
gpu/command_buffer/service
@ -450,8 +450,7 @@ gpu::SyncToken OneCopyRasterBufferProvider::CopyOnWorkerThread(
|
|||||||
query_target = GL_COMMANDS_ISSUED_CHROMIUM;
|
query_target = GL_COMMANDS_ISSUED_CHROMIUM;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// COMMANDS_ISSUED is sufficient for shared memory GpuMemoryBuffers because
|
// COMMANDS_ISSUED is sufficient for shared memory GpuMemoryBuffers.
|
||||||
// they're uploaded using glTexImage2D (see gl::GLImageMemory::CopyTexImage).
|
|
||||||
const auto* buffer = staging_buffer->gpu_memory_buffer.get();
|
const auto* buffer = staging_buffer->gpu_memory_buffer.get();
|
||||||
if (buffer &&
|
if (buffer &&
|
||||||
buffer->GetType() == gfx::GpuMemoryBufferType::SHARED_MEMORY_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
|
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
|
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
|
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:
|
drawing operations:
|
||||||
|
|
||||||
```c++
|
```c++
|
||||||
|
@ -1258,8 +1258,8 @@ void FeatureInfo::InitializeFeatures() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if BUILDFLAG(IS_APPLE)
|
#if BUILDFLAG(IS_APPLE)
|
||||||
// Macs can create GLImages out of AR30 IOSurfaces. iOS based devices seem to
|
// Macs can create SharedImages out of AR30 IOSurfaces. iOS based devices seem
|
||||||
// handle well also.
|
// to handle well also.
|
||||||
feature_flags_.chromium_image_ar30 = true;
|
feature_flags_.chromium_image_ar30 = true;
|
||||||
#elif !BUILDFLAG(IS_WIN)
|
#elif !BUILDFLAG(IS_WIN)
|
||||||
// TODO(mcasas): connect in Windows, https://crbug.com/803451
|
// TODO(mcasas): connect in Windows, https://crbug.com/803451
|
||||||
|
@ -580,7 +580,7 @@ AHardwareBufferImageBackingFactory::FormatInfoForSupportedFormat(
|
|||||||
GLenum gl_format = GLDataFormat(format);
|
GLenum gl_format = GLDataFormat(format);
|
||||||
GLenum gl_type = GLDataType(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) {
|
if (internal_format != GL_RGBA && internal_format != GL_RGB) {
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ class GpuDriverBugWorkarounds;
|
|||||||
struct GpuPreferences;
|
struct GpuPreferences;
|
||||||
|
|
||||||
// Common constructor and helper functions for
|
// Common constructor and helper functions for
|
||||||
// GLTextureImageBackingFactory and GLImageBackingFactory.
|
// various GL-based backing factories.
|
||||||
class GPU_GLES2_EXPORT GLCommonImageBackingFactory
|
class GPU_GLES2_EXPORT GLCommonImageBackingFactory
|
||||||
: public SharedImageBackingFactory {
|
: public SharedImageBackingFactory {
|
||||||
public:
|
public:
|
||||||
|
@ -14,15 +14,14 @@
|
|||||||
namespace gpu {
|
namespace gpu {
|
||||||
|
|
||||||
// Interface through which a representation that has a GL texture calls into its
|
// Interface through which a representation that has a GL texture calls into its
|
||||||
// GLImage backing.
|
// backing.
|
||||||
class GLTextureImageRepresentationClient {
|
class GLTextureImageRepresentationClient {
|
||||||
public:
|
public:
|
||||||
virtual bool GLTextureImageRepresentationBeginAccess(bool readonly) = 0;
|
virtual bool GLTextureImageRepresentationBeginAccess(bool readonly) = 0;
|
||||||
virtual void GLTextureImageRepresentationEndAccess(bool readonly) = 0;
|
virtual void GLTextureImageRepresentationEndAccess(bool readonly) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Representation of a GLTextureImageBacking or GLImageBacking
|
// Representation of a GLTextureImageBacking as a GL Texture.
|
||||||
// as a GL Texture.
|
|
||||||
class GLTextureGLCommonRepresentation : public GLTextureImageRepresentation {
|
class GLTextureGLCommonRepresentation : public GLTextureImageRepresentation {
|
||||||
public:
|
public:
|
||||||
GLTextureGLCommonRepresentation(SharedImageManager* manager,
|
GLTextureGLCommonRepresentation(SharedImageManager* manager,
|
||||||
|
Reference in New Issue
Block a user