Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 } |
| OLD | NEW |