2 * Copyright 2012 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
11 #include "GrGpuObject.h"
12 #include "GrResourceCache.h"
15 #include "SkStrokeRec.h"
17 class GrPath : public GrGpuObject {
19 SK_DECLARE_INST_COUNT(GrPath);
21 GrPath(GrGpu* gpu, bool isWrapped, const SkPath& skPath, const SkStrokeRec& stroke)
22 : INHERITED(gpu, isWrapped),
25 fBounds(skPath.getBounds()) {
28 static GrResourceKey ComputeKey(const SkPath& path, const SkStrokeRec& stroke);
30 bool isEqualTo(const SkPath& path, const SkStrokeRec& stroke) {
31 return fSkPath == path && fStroke == stroke;
34 const SkRect& getBounds() const { return fBounds; }
36 const SkStrokeRec& getStroke() const { return fStroke; }
44 typedef GrGpuObject INHERITED;