Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3300)

Unified Diff: gpu/command_buffer/client/gles2_implementation.h

Issue 2826043002: Do not share FBOs/VAOs/Transform feedback objects across contexts (Closed)
Patch Set: added DeleteFramebuffers() expectation Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/client/gles2_implementation.h
diff --git a/gpu/command_buffer/client/gles2_implementation.h b/gpu/command_buffer/client/gles2_implementation.h
index af72fa0ba5bf6aeabd393b9d2bce8f5090e5a3bb..06938c928fbf15b27a51284599d567f308d36ca1 100644
--- a/gpu/command_buffer/client/gles2_implementation.h
+++ b/gpu/command_buffer/client/gles2_implementation.h
@@ -285,6 +285,8 @@ class GLES2_IMPL_EXPORT GLES2Implementation
friend class VertexArrayObjectManager;
friend class QueryTracker;
+ using IdNamespaces = id_namespaces::IdNamespaces;
+
// Used to track whether an extension is available
enum ExtensionStatus {
kAvailableExtensionStatus,
@@ -489,7 +491,6 @@ class GLES2_IMPL_EXPORT GLES2Implementation
void BindBufferBaseStub(GLenum target, GLuint index, GLuint buffer);
void BindBufferRangeStub(GLenum target, GLuint index, GLuint buffer,
GLintptr offset, GLsizeiptr size);
- void BindFramebufferStub(GLenum target, GLuint framebuffer);
void BindRenderbufferStub(GLenum target, GLuint renderbuffer);
void BindTextureStub(GLenum target, GLuint texture);
@@ -516,16 +517,12 @@ class GLES2_IMPL_EXPORT GLES2Implementation
void DeleteSyncHelper(GLsync sync);
void DeleteBuffersStub(GLsizei n, const GLuint* buffers);
- void DeleteFramebuffersStub(GLsizei n, const GLuint* framebuffers);
void DeleteRenderbuffersStub(GLsizei n, const GLuint* renderbuffers);
void DeleteTexturesStub(GLsizei n, const GLuint* textures);
void DeletePathsCHROMIUMStub(GLuint first_client_id, GLsizei range);
void DeleteProgramStub(GLsizei n, const GLuint* programs);
void DeleteShaderStub(GLsizei n, const GLuint* shaders);
- void DeleteVertexArraysOESStub(GLsizei n, const GLuint* arrays);
void DeleteSamplersStub(GLsizei n, const GLuint* samplers);
- void DeleteTransformFeedbacksStub(
- GLsizei n, const GLuint* transformfeedbacks);
void DeleteSyncStub(GLsizei n, const GLuint* syncs);
void BufferDataHelper(
@@ -620,12 +617,10 @@ class GLES2_IMPL_EXPORT GLES2Implementation
// Caches certain capabilties state. Return true if cached.
bool SetCapabilityState(GLenum cap, bool enabled);
- IdHandlerInterface* GetIdHandler(int id_namespace) const;
+ IdHandlerInterface* GetIdHandler(SharedIdNamespaces id_namespace) const;
RangeIdHandlerInterface* GetRangeIdHandler(int id_namespace) const;
// IdAllocators for objects that can't be shared among contexts.
- // For now, used only for Queries. TODO(hj.r.chung) Should be added for
- // Framebuffer and Vertex array objects.
- IdAllocator* GetIdAllocator(int id_namespace) const;
+ IdAllocator* GetIdAllocator(IdNamespaces id_namespace) const;
void FinishHelper();
void FlushHelper();
@@ -810,7 +805,8 @@ class GLES2_IMPL_EXPORT GLES2Implementation
ShareGroupContextData share_group_context_data_;
std::unique_ptr<QueryTracker> query_tracker_;
- std::unique_ptr<IdAllocator> query_id_allocator_;
+ std::unique_ptr<IdAllocator>
+ id_allocators_[static_cast<int>(IdNamespaces::kNumIdNamespaces)];
std::unique_ptr<BufferTracker> buffer_tracker_;

Powered by Google App Engine
This is Rietveld 408576698