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

Side by Side Diff: gpu/command_buffer/client/gl_in_process_context.h

Issue 429863002: Remove GLInProcessContext::CreateContext() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_ 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_
6 #define GPU_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_ 6 #define GPU_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "gl_in_process_context_export.h" 10 #include "gl_in_process_context_export.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 int32 lose_context_when_out_of_memory; 45 int32 lose_context_when_out_of_memory;
46 }; 46 };
47 47
48 class GL_IN_PROCESS_CONTEXT_EXPORT GLInProcessContext { 48 class GL_IN_PROCESS_CONTEXT_EXPORT GLInProcessContext {
49 public: 49 public:
50 virtual ~GLInProcessContext() {} 50 virtual ~GLInProcessContext() {}
51 51
52 // Create a GLInProcessContext, if |is_offscreen| is true, renders to an 52 // Create a GLInProcessContext, if |is_offscreen| is true, renders to an
53 // offscreen context. |attrib_list| must be NULL or a NONE-terminated list 53 // offscreen context. |attrib_list| must be NULL or a NONE-terminated list
54 // of attribute/value pairs. 54 // of attribute/value pairs.
55 // TODO(boliu): Fix all callsites to use Create and remove this.
56 static GLInProcessContext* CreateContext(
57 bool is_offscreen,
58 gfx::AcceleratedWidget window,
59 const gfx::Size& size,
60 bool share_resources,
61 const GLInProcessContextAttribs& attribs,
62 gfx::GpuPreference gpu_preference);
63
64 // If |surface| is not NULL, then it must match |is_offscreen| and |size|, 55 // If |surface| is not NULL, then it must match |is_offscreen| and |size|,
65 // |window| must be gfx::kNullAcceleratedWidget, and the command buffer 56 // |window| must be gfx::kNullAcceleratedWidget, and the command buffer
66 // service must run on the same thread as this client because GLSurface is 57 // service must run on the same thread as this client because GLSurface is
67 // not thread safe. If |surface| is NULL, then the other parameters are used 58 // not thread safe. If |surface| is NULL, then the other parameters are used
68 // to correctly create a surface. 59 // to correctly create a surface.
69 // Only one of |share_context| and |use_global_share_group| can be used at 60 // Only one of |share_context| and |use_global_share_group| can be used at
70 // the same time. 61 // the same time.
71 static GLInProcessContext* Create( 62 static GLInProcessContext* Create(
72 scoped_refptr<gpu::InProcessCommandBuffer::Service> service, 63 scoped_refptr<gpu::InProcessCommandBuffer::Service> service,
73 scoped_refptr<gfx::GLSurface> surface, 64 scoped_refptr<gfx::GLSurface> surface,
(...skipping 13 matching lines...) Expand all
87 78
88 #if defined(OS_ANDROID) 79 #if defined(OS_ANDROID)
89 virtual scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( 80 virtual scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture(
90 uint32 stream_id) = 0; 81 uint32 stream_id) = 0;
91 #endif 82 #endif
92 }; 83 };
93 84
94 } // namespace gpu 85 } // namespace gpu
95 86
96 #endif // GPU_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_ 87 #endif // GPU_COMMAND_BUFFER_CLIENT_GL_IN_PROCESS_CONTEXT_H_
OLDNEW
« no previous file with comments | « cc/test/test_in_process_context_provider.cc ('k') | gpu/command_buffer/client/gl_in_process_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698