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

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

Issue 455083002: Add memory limits struct to in-process context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: x64 fix attempt 2 Created 6 years, 4 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/gl_in_process_context.h
diff --git a/gpu/command_buffer/client/gl_in_process_context.h b/gpu/command_buffer/client/gl_in_process_context.h
index 6175cc556ad284f9522cacbd9ced80c7796798d1..33b13489679320e7a864ed9a848144fbf9c356ab 100644
--- a/gpu/command_buffer/client/gl_in_process_context.h
+++ b/gpu/command_buffer/client/gl_in_process_context.h
@@ -30,6 +30,16 @@ namespace gles2 {
class GLES2Implementation;
}
+struct GL_IN_PROCESS_CONTEXT_EXPORT GLInProcessContextSharedMemoryLimits {
+ GLInProcessContextSharedMemoryLimits();
+
+ int32 command_buffer_size;
+ unsigned int start_transfer_buffer_size;
+ unsigned int min_transfer_buffer_size;
+ unsigned int max_transfer_buffer_size;
+ unsigned int mapped_memory_reclaim_limit;
+};
+
class GL_IN_PROCESS_CONTEXT_EXPORT GLInProcessContext {
public:
virtual ~GLInProcessContext() {}
@@ -53,7 +63,8 @@ class GL_IN_PROCESS_CONTEXT_EXPORT GLInProcessContext {
GLInProcessContext* share_context,
bool use_global_share_group,
const gpu::gles2::ContextCreationAttribHelper& attribs,
- gfx::GpuPreference gpu_preference);
+ gfx::GpuPreference gpu_preference,
+ const GLInProcessContextSharedMemoryLimits& memory_limits);
virtual void SetContextLostCallback(const base::Closure& callback) = 0;
@@ -61,6 +72,8 @@ class GL_IN_PROCESS_CONTEXT_EXPORT GLInProcessContext {
// can be used without making it current.
virtual gles2::GLES2Implementation* GetImplementation() = 0;
+ virtual size_t GetMappedMemoryLimit() = 0;
+
#if defined(OS_ANDROID)
virtual scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture(
uint32 stream_id) = 0;

Powered by Google App Engine
This is Rietveld 408576698