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

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

Issue 400713003: Add a GrPathRange class (Closed) Base URL: https://skia.googlesource.com/skia.git@clupload-ispath
Patch Set: 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 * 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 GrPathRange_DEFINED
9 #define GrPathRange_DEFINED
10
11 #include "GrGpuObject.h"
12 #include "SkStrokeRec.h"
13
14 class SkPath;
15
16 /**
17 * Represents a contiguous range of GPU path objects with a common stroke. The
18 * path range is immutable with the exception that individual paths can be
19 * initialized lazily. Unititialized paths are silently ignored by drawing
20 * functions.
21 */
22 class GrPathRange : public GrGpuObject {
23 public:
24 SK_DECLARE_INST_COUNT(GrPathRange);
25
26 GrPathRange(GrGpu* gpu, bool isWrapped, size_t size, const SkStrokeRec& stro ke)
bsalomon 2014/07/17 17:27:28 given that we don't have a GrContext::wrapPathRang
Chris Dalton 2014/07/17 18:15:19 Yeah that seems fine. I'm not too familiar with th
27 : INHERITED(gpu, isWrapped),
28 fSize(size),
29 fStroke(stroke) {
30 }
31
32 size_t getSize() const { return fSize; }
33 const SkStrokeRec& getStroke() const { return fStroke; }
34
35 /**
36 * Initialize a path in the range. It is invalid to call this method for a
37 * path that has already been initialized.
38 */
39 virtual void initAt(size_t index, const SkPath&) = 0;
40
41 protected:
42 size_t fSize;
43 SkStrokeRec fStroke;
44
45 private:
46 typedef GrGpuObject INHERITED;
47 };
48
49 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698