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

Side by Side Diff: src/gpu/GrGeometryData.h

Issue 745663002: Adding GeometryData object (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback inc Created 6 years 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
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrGeometryProcessor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2014 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef GrGeometryData_DEFINED
9 #define GrGeometryData_DEFINED
10
11 #include <new>
12 #include "SkTypes.h"
13
14 /*
15 * A super lightweight base class for GeometryProcessor's to use to store draw d ata in a reorderable
16 * fashion. Its most important feature is a pool allocator. Its virtual, but o nly so subclasses
17 * will have their destructors called.
18 */
19
20 class GrGeometryData : SkNoncopyable {
21 public:
22 virtual ~GrGeometryData() {}
23
24 /**
25 * Helper for down-casting to a GrGeometryData subclass
26 */
27 template <typename T> const T& cast() const { return *static_cast<const T*>( this); }
28
29 void* operator new(size_t size);
30
31 void operator delete(void* target);
32
33 void* operator new(size_t size, void* placement) {
34 return ::operator new(size, placement);
35 }
36
37 void operator delete(void* target, void* placement) {
38 ::operator delete(target, placement);
39 }
40 };
41
42 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrGeometryProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698