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

Side by Side Diff: src/gpu/GrResourceProvider.cpp

Issue 1155593002: Move GrPath(Range) creation to ResourceProvider. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 7 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/GrResourceProvider.h ('k') | src/gpu/GrStencilAndCoverPathRenderer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrResourceProvider.h" 8 #include "GrResourceProvider.h"
9 9
10 #include "GrGpu.h" 10 #include "GrGpu.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 56 }
57 57
58 const GrIndexBuffer* GrResourceProvider::createQuadIndexBuffer() { 58 const GrIndexBuffer* GrResourceProvider::createQuadIndexBuffer() {
59 static const int kMaxQuads = 1 << 12; // max possible: (1 << 14) - 1; 59 static const int kMaxQuads = 1 << 12; // max possible: (1 << 14) - 1;
60 GR_STATIC_ASSERT(4 * kMaxQuads <= 65535); 60 GR_STATIC_ASSERT(4 * kMaxQuads <= 65535);
61 static const uint16_t kPattern[] = { 0, 1, 2, 0, 2, 3 }; 61 static const uint16_t kPattern[] = { 0, 1, 2, 0, 2, 3 };
62 62
63 return this->createInstancedIndexBuffer(kPattern, 6, kMaxQuads, 4, fQuadInde xBufferKey); 63 return this->createInstancedIndexBuffer(kPattern, 6, kMaxQuads, 4, fQuadInde xBufferKey);
64 } 64 }
65 65
66 GrPath* GrResourceProvider::createPath(const SkPath& path, const GrStrokeInfo& s troke) {
67 SkASSERT(this->gpu()->pathRendering());
68 return this->gpu()->pathRendering()->createPath(path, stroke);
69 }
70
71 GrPathRange* GrResourceProvider::createPathRange(GrPathRange::PathGenerator* gen ,
72 const GrStrokeInfo& stroke) {
73 SkASSERT(this->gpu()->pathRendering());
74 return this->gpu()->pathRendering()->createPathRange(gen, stroke);
75 }
76
77 GrPathRange* GrResourceProvider::createGlyphs(const SkTypeface* tf, const SkDesc riptor* desc,
78 const GrStrokeInfo& stroke) {
79
80 SkASSERT(this->gpu()->pathRendering());
81 return this->gpu()->pathRendering()->createGlyphs(tf, desc, stroke);
82 }
83
OLDNEW
« no previous file with comments | « src/gpu/GrResourceProvider.h ('k') | src/gpu/GrStencilAndCoverPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698