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

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

Issue 1967513002: Revert of Replace GrStrokeInfo with GrStyle. (Closed) Base URL: https://chromium.googlesource.com/skia.git@resscale
Patch Set: Created 4 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/GrSWMaskHelper.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 "GrBuffer.h" 10 #include "GrBuffer.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 const GrBuffer* GrResourceProvider::createQuadIndexBuffer() { 65 const GrBuffer* GrResourceProvider::createQuadIndexBuffer() {
66 static const int kMaxQuads = 1 << 12; // max possible: (1 << 14) - 1; 66 static const int kMaxQuads = 1 << 12; // max possible: (1 << 14) - 1;
67 GR_STATIC_ASSERT(4 * kMaxQuads <= 65535); 67 GR_STATIC_ASSERT(4 * kMaxQuads <= 65535);
68 static const uint16_t kPattern[] = { 0, 1, 2, 0, 2, 3 }; 68 static const uint16_t kPattern[] = { 0, 1, 2, 0, 2, 3 };
69 69
70 return this->createInstancedIndexBuffer(kPattern, 6, kMaxQuads, 4, fQuadInde xBufferKey); 70 return this->createInstancedIndexBuffer(kPattern, 6, kMaxQuads, 4, fQuadInde xBufferKey);
71 } 71 }
72 72
73 GrPath* GrResourceProvider::createPath(const SkPath& path, const GrStyle& style) { 73 GrPath* GrResourceProvider::createPath(const SkPath& path, const GrStrokeInfo& s troke) {
74 SkASSERT(this->gpu()->pathRendering()); 74 SkASSERT(this->gpu()->pathRendering());
75 return this->gpu()->pathRendering()->createPath(path, style); 75 return this->gpu()->pathRendering()->createPath(path, stroke);
76 } 76 }
77 77
78 GrPathRange* GrResourceProvider::createPathRange(GrPathRange::PathGenerator* gen , 78 GrPathRange* GrResourceProvider::createPathRange(GrPathRange::PathGenerator* gen ,
79 const GrStyle& style) { 79 const GrStrokeInfo& stroke) {
80 SkASSERT(this->gpu()->pathRendering()); 80 SkASSERT(this->gpu()->pathRendering());
81 return this->gpu()->pathRendering()->createPathRange(gen, style); 81 return this->gpu()->pathRendering()->createPathRange(gen, stroke);
82 } 82 }
83 83
84 GrPathRange* GrResourceProvider::createGlyphs(const SkTypeface* tf, 84 GrPathRange* GrResourceProvider::createGlyphs(const SkTypeface* tf,
85 const SkScalerContextEffects& effe cts, 85 const SkScalerContextEffects& effe cts,
86 const SkDescriptor* desc, 86 const SkDescriptor* desc,
87 const GrStyle& style) { 87 const GrStrokeInfo& stroke) {
88 88
89 SkASSERT(this->gpu()->pathRendering()); 89 SkASSERT(this->gpu()->pathRendering());
90 return this->gpu()->pathRendering()->createGlyphs(tf, effects, desc, style); 90 return this->gpu()->pathRendering()->createGlyphs(tf, effects, desc, stroke) ;
91 } 91 }
92 92
93 GrBuffer* GrResourceProvider::createBuffer(size_t size, GrBufferType intendedTyp e, 93 GrBuffer* GrResourceProvider::createBuffer(size_t size, GrBufferType intendedTyp e,
94 GrAccessPattern accessPattern, uint32 _t flags, 94 GrAccessPattern accessPattern, uint32 _t flags,
95 const void* data) { 95 const void* data) {
96 if (this->isAbandoned()) { 96 if (this->isAbandoned()) {
97 return nullptr; 97 return nullptr;
98 } 98 }
99 if (kDynamic_GrAccessPattern != accessPattern) { 99 if (kDynamic_GrAccessPattern != accessPattern) {
100 return this->gpu()->createBuffer(size, intendedType, accessPattern, data ); 100 return this->gpu()->createBuffer(size, intendedType, accessPattern, data );
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 return rt->renderTargetPriv().getStencilAttachment(); 196 return rt->renderTargetPriv().getStencilAttachment();
197 } 197 }
198 198
199 GrRenderTarget* GrResourceProvider::wrapBackendTextureAsRenderTarget( 199 GrRenderTarget* GrResourceProvider::wrapBackendTextureAsRenderTarget(
200 const GrBackendTextureDesc& desc) { 200 const GrBackendTextureDesc& desc) {
201 if (this->isAbandoned()) { 201 if (this->isAbandoned()) {
202 return nullptr; 202 return nullptr;
203 } 203 }
204 return this->gpu()->wrapBackendTextureAsRenderTarget(desc); 204 return this->gpu()->wrapBackendTextureAsRenderTarget(desc);
205 } 205 }
OLDNEW
« no previous file with comments | « src/gpu/GrResourceProvider.h ('k') | src/gpu/GrSWMaskHelper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698