| 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 "GrAtlasTextContext.h" | 8 #include "GrAtlasTextContext.h" |
| 9 #include "GrDrawContext.h" | 9 #include "GrDrawContext.h" |
| 10 #include "GrDrawingManager.h" | 10 #include "GrDrawingManager.h" |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 if (fDrawTargets.count()) { | 145 if (fDrawTargets.count()) { |
| 146 SkASSERT(fDrawTargets.count() == 1); | 146 SkASSERT(fDrawTargets.count() == 1); |
| 147 // In the non-MDB-world the same drawTarget gets reused for multiple ren
der targets. | 147 // In the non-MDB-world the same drawTarget gets reused for multiple ren
der targets. |
| 148 // Update this pointer so all the asserts are happy | 148 // Update this pointer so all the asserts are happy |
| 149 rt->setLastDrawTarget(fDrawTargets[0]); | 149 rt->setLastDrawTarget(fDrawTargets[0]); |
| 150 // DrawingManager gets the creation ref - this ref is for the caller | 150 // DrawingManager gets the creation ref - this ref is for the caller |
| 151 return SkRef(fDrawTargets[0]); | 151 return SkRef(fDrawTargets[0]); |
| 152 } | 152 } |
| 153 #endif | 153 #endif |
| 154 | 154 |
| 155 GrDrawTarget* dt = new GrDrawTarget(rt, fContext->getGpu(), fContext->resour
ceProvider()); | 155 GrDrawTarget* dt = new GrDrawTarget(rt, fContext->getGpu(), fContext->resour
ceProvider(), |
| 156 fOptionsForDrawTargets); |
| 156 | 157 |
| 157 *fDrawTargets.append() = dt; | 158 *fDrawTargets.append() = dt; |
| 158 | 159 |
| 159 // DrawingManager gets the creation ref - this ref is for the caller | 160 // DrawingManager gets the creation ref - this ref is for the caller |
| 160 return SkRef(dt); | 161 return SkRef(dt); |
| 161 } | 162 } |
| 162 | 163 |
| 163 /* | 164 /* |
| 164 * This method finds a path renderer that can draw the specified path on | 165 * This method finds a path renderer that can draw the specified path on |
| 165 * the provided target. | 166 * the provided target. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 187 } | 188 } |
| 188 | 189 |
| 189 GrDrawContext* GrDrawingManager::drawContext(GrRenderTarget* rt, | 190 GrDrawContext* GrDrawingManager::drawContext(GrRenderTarget* rt, |
| 190 const SkSurfaceProps* surfaceProps)
{ | 191 const SkSurfaceProps* surfaceProps)
{ |
| 191 if (this->abandoned()) { | 192 if (this->abandoned()) { |
| 192 return nullptr; | 193 return nullptr; |
| 193 } | 194 } |
| 194 | 195 |
| 195 return new GrDrawContext(this, rt, surfaceProps); | 196 return new GrDrawContext(this, rt, surfaceProps); |
| 196 } | 197 } |
| OLD | NEW |