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

Side by Side Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h

Issue 1235203003: WIP cc: remove unused and legacy GetMappedMemoryLimit code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ 5 #ifndef CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ 6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // on any failure. 132 // on any failure.
133 static CONTENT_EXPORT WebGraphicsContext3DCommandBufferImpl* 133 static CONTENT_EXPORT WebGraphicsContext3DCommandBufferImpl*
134 CreateOffscreenContext( 134 CreateOffscreenContext(
135 GpuChannelHost* host, 135 GpuChannelHost* host,
136 const WebGraphicsContext3D::Attributes& attributes, 136 const WebGraphicsContext3D::Attributes& attributes,
137 bool lose_context_when_out_of_memory, 137 bool lose_context_when_out_of_memory,
138 const GURL& active_url, 138 const GURL& active_url,
139 const SharedMemoryLimits& limits, 139 const SharedMemoryLimits& limits,
140 WebGraphicsContext3DCommandBufferImpl* share_context); 140 WebGraphicsContext3DCommandBufferImpl* share_context);
141 141
142 size_t GetMappedMemoryLimit() {
143 return mem_limits_.mapped_memory_reclaim_limit;
144 }
145
146 CONTENT_EXPORT bool InitializeOnCurrentThread(); 142 CONTENT_EXPORT bool InitializeOnCurrentThread();
147 143
148 void SetContextType(CommandBufferContextType type) { 144 void SetContextType(CommandBufferContextType type) {
149 context_type_ = type; 145 context_type_ = type;
150 } 146 }
151 private: 147 private:
152 // These are the same error codes as used by EGL. 148 // These are the same error codes as used by EGL.
153 enum Error { 149 enum Error {
154 SUCCESS = 0x3000, 150 SUCCESS = 0x3000,
155 BAD_ATTRIBUTE = 0x3004, 151 BAD_ATTRIBUTE = 0x3004,
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 204
209 // Member variables should appear before the WeakPtrFactory, to ensure 205 // Member variables should appear before the WeakPtrFactory, to ensure
210 // that any WeakPtrs to Controller are invalidated before its members 206 // that any WeakPtrs to Controller are invalidated before its members
211 // variable's destructors are executed, rendering them invalid. 207 // variable's destructors are executed, rendering them invalid.
212 base::WeakPtrFactory<WebGraphicsContext3DCommandBufferImpl> weak_ptr_factory_; 208 base::WeakPtrFactory<WebGraphicsContext3DCommandBufferImpl> weak_ptr_factory_;
213 }; 209 };
214 210
215 } // namespace content 211 } // namespace content
216 212
217 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ 213 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698