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

Side by Side Diff: gpu/command_buffer/service/path_manager.h

Issue 169403005: command_buffer: Implement path rendering functions for CHROMIUM_path_rendering (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nv-pr-02-texgen
Patch Set: improve parameter validation and write up the extension .txt file Created 6 years, 8 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
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef GPU_COMMAND_BUFFER_SERVICE_PATH_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_PATH_MANAGER_H_
7
8 #include <vector>
9
10 #include "base/basictypes.h"
11 #include "base/containers/hash_tables.h"
12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "gpu/command_buffer/service/gl_utils.h"
15 #include "gpu/gpu_export.h"
16
17 namespace gpu {
18 namespace gles2 {
19
20 // This class keeps track of paths and their client and service ids
21 // so we can correctly clear them.
22 class GPU_EXPORT PathManager {
23 public:
24 PathManager();
25 ~PathManager();
26
27 // Must call before destruction.
28 void Destroy(bool have_context);
29
30 // Creates a path
piman 2014/04/24 22:26:36 nit: period at the end of comments (here and below
31 void CreatePath(GLuint client_id, GLuint service_id);
32
33 // Gets the path. Returns false if path not found
34 bool GetPath(GLuint client_id, GLuint* service_id = NULL);
35
36 // Removes a range of paths
37 void RemovePaths(GLuint path, GLuint range);
38
39 private:
40 // Info for each path in the system.
41 typedef base::hash_map<GLuint, GLuint> PathMap;
42 PathMap path_map_;
43
44 bool have_context_;
45
46 DISALLOW_COPY_AND_ASSIGN(PathManager);
47 };
48
49 } // namespace gles2
50 } // namespace gpu
51
52 #endif // GPU_COMMAND_BUFFER_SERVICE_PATH_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698