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

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

Issue 877393002: Revert of GrBatchPrototype (Closed) Base URL: https://skia.googlesource.com/skia.git@lc2
Patch Set: Created 5 years, 10 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
« no previous file with comments | « src/gpu/GrFlushToGpuDrawTarget.cpp ('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 | « src/gpu/GrFlushToGpuDrawTarget.cpp ('k') | src/gpu/GrGeometryProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698