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

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

Issue 400713003: Add a GrPathRange class (Closed) Base URL: https://skia.googlesource.com/skia.git@clupload-ispath
Patch Set: Fix more windows trivial warningswq Created 6 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
(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 GrGLPathRange_DEFINED
10 #define GrGLPathRange_DEFINED
11
12 #include "../GrPathRange.h"
13 #include "gl/GrGLFunctions.h"
14
15 class GrGpuGL;
16
17 /**
18 * Currently this represents a range of GL_NV_path_rendering Path IDs. If we
19 * support other GL path extensions then this would have to have a type enum
20 * and/or be subclassed.
21 */
22
23 class GrGLPathRange : public GrPathRange {
24 public:
25 GrGLPathRange(GrGpu*, size_t size, const SkStrokeRec&);
26 virtual ~GrGLPathRange();
27
28 GrGLuint basePathID() const { return fBasePathID; }
29
30 virtual void initAt(size_t index, const SkPath&);
31
32 // TODO: Use a better approximation for the individual path sizes.
33 virtual size_t gpuMemorySize() const SK_OVERRIDE {
34 return 100 * fNumDefinedPaths;
35 }
36
37 protected:
38 virtual void onRelease() SK_OVERRIDE;
39 virtual void onAbandon() SK_OVERRIDE;
40
41 private:
42 GrGLuint fBasePathID;
43 size_t fNumDefinedPaths;
44
45 typedef GrPathRange INHERITED;
46 };
47
48 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698