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

Side by Side Diff: src/gpu/gl/GrGLNameAllocator.h

Issue 304403003: Generate path names on the client side (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1
2 /*
3 * Copyright 2014 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8
9 #ifndef GrGLNameAllocator_DEFINED
10 #define GrGLNameAllocator_DEFINED
11
12 #include "SkRefCnt.h"
13 #include "gl/GrGLFunctions.h"
bsalomon 2014/05/30 18:09:11 Is this for the GrGL data types?
Chris Dalton 2014/05/30 21:39:41 Yeah - GrGLuint. Would you prefer to use a more ge
bsalomon 2014/06/02 15:14:43 I was mostly just curious. But maybe we could sepa
14
15 /**
16 * This class takes ownership of a range of OpenGL object names and manages
17 * allocations within that range. This allows the app to generate new objects
18 * on the client side without having to make round trips to the GL server.
19 */
20
21 class GrGLNameAllocator {
22 class SparseNameRange;
bsalomon 2014/05/30 18:09:11 Can you move these down to the explicit private se
23 class SparseNameTree;
24 class ContiguousNameRange;
25
26 public:
27 GrGLNameAllocator(GrGLuint names, GrGLuint range);
28 ~GrGLNameAllocator();
29
30 GrGLuint names() const { return fNames; }
bsalomon 2014/05/30 18:09:11 some docs here would useful
31 GrGLuint range() const { return fRange; }
32
33 GrGLuint allocateName();
34 void freeName(GrGLuint name);
35
36 private:
37 const GrGLuint fNames;
38 const GrGLuint fRange;
39 SkAutoTUnref<SparseNameRange> fAllocatedNames;
40 };
41
42 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/gl/GrGLNameAllocator.cpp » ('j') | src/gpu/gl/GrGLNameAllocator.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698