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

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

Issue 2240623002: Move GrAtlasTextContext to GrDrawingManager, so we only have one. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix alignment Created 4 years, 4 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/GrDrawingManager.h ('k') | src/gpu/GrPathRenderingDrawContext.cpp » ('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 "GrDrawContext.h" 8 #include "GrDrawContext.h"
9 #include "GrDrawingManager.h" 9 #include "GrDrawingManager.h"
10 #include "GrDrawTarget.h" 10 #include "GrDrawTarget.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 GrDrawTarget* dt = new GrDrawTarget(rt, fContext->getGpu(), fContext->resour ceProvider(), 144 GrDrawTarget* dt = new GrDrawTarget(rt, fContext->getGpu(), fContext->resour ceProvider(),
145 fContext->getAuditTrail(), fOptionsForDr awTargets); 145 fContext->getAuditTrail(), fOptionsForDr awTargets);
146 146
147 *fDrawTargets.append() = dt; 147 *fDrawTargets.append() = dt;
148 148
149 // DrawingManager gets the creation ref - this ref is for the caller 149 // DrawingManager gets the creation ref - this ref is for the caller
150 return SkRef(dt); 150 return SkRef(dt);
151 } 151 }
152 152
153 GrAtlasTextContext* GrDrawingManager::getAtlasTextContext() {
154 if (!fAtlasTextContext) {
jvanverth1 2016/08/11 19:39:46 Sorry I'm late to the party. Is there any problem
155 fAtlasTextContext.reset(GrAtlasTextContext::Create());
156 }
157
158 return fAtlasTextContext.get();
159 }
160
153 /* 161 /*
154 * This method finds a path renderer that can draw the specified path on 162 * This method finds a path renderer that can draw the specified path on
155 * the provided target. 163 * the provided target.
156 * Due to its expense, the software path renderer has split out so it can 164 * Due to its expense, the software path renderer has split out so it can
157 * can be individually allowed/disallowed via the "allowSW" boolean. 165 * can be individually allowed/disallowed via the "allowSW" boolean.
158 */ 166 */
159 GrPathRenderer* GrDrawingManager::getPathRenderer(const GrPathRenderer::CanDrawP athArgs& args, 167 GrPathRenderer* GrDrawingManager::getPathRenderer(const GrPathRenderer::CanDrawP athArgs& args,
160 bool allowSW, 168 bool allowSW,
161 GrPathRendererChain::DrawType drawType, 169 GrPathRendererChain::DrawType drawType,
162 GrPathRenderer::StencilSupport * stencilSupport) { 170 GrPathRenderer::StencilSupport * stencilSupport) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 std::move(colorSpace), s urfaceProps, 206 std::move(colorSpace), s urfaceProps,
199 fContext->getAuditTrail( ), fSingleOwner)); 207 fContext->getAuditTrail( ), fSingleOwner));
200 } 208 }
201 } 209 }
202 210
203 return sk_sp<GrDrawContext>(new GrDrawContext(fContext, this, std::move(rt), 211 return sk_sp<GrDrawContext>(new GrDrawContext(fContext, this, std::move(rt),
204 std::move(colorSpace), surface Props, 212 std::move(colorSpace), surface Props,
205 fContext->getAuditTrail(), 213 fContext->getAuditTrail(),
206 fSingleOwner)); 214 fSingleOwner));
207 } 215 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawingManager.h ('k') | src/gpu/GrPathRenderingDrawContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698