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

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

Issue 1686143003: Remove GrContext* from GrTextContext (Closed) Base URL: https://skia.googlesource.com/skia.git@tc-cleanup-5-movecontext
Patch Set: cleanup Created 4 years, 10 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/GrDrawContext.cpp ('k') | src/gpu/text/GrAtlasTextContext.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 "GrDrawContext.h" 8 #include "GrDrawContext.h"
9 #include "GrDrawingManager.h" 9 #include "GrDrawingManager.h"
10 #include "GrDrawTarget.h" 10 #include "GrDrawTarget.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 return nullptr; 119 return nullptr;
120 } 120 }
121 121
122 bool useDIF = props.isUseDeviceIndependentFonts(); 122 bool useDIF = props.isUseDeviceIndependentFonts();
123 123
124 if (useDIF && fContext->caps()->shaderCaps()->pathRenderingSupport() && 124 if (useDIF && fContext->caps()->shaderCaps()->pathRenderingSupport() &&
125 rt->isStencilBufferMultisampled()) { 125 rt->isStencilBufferMultisampled()) {
126 GrStencilAttachment* sb = fContext->resourceProvider()->attachStencilAtt achment(rt); 126 GrStencilAttachment* sb = fContext->resourceProvider()->attachStencilAtt achment(rt);
127 if (sb) { 127 if (sb) {
128 if (!fNVPRTextContext) { 128 if (!fNVPRTextContext) {
129 fNVPRTextContext = GrStencilAndCoverTextContext::Create(fContext ); 129 fNVPRTextContext = GrStencilAndCoverTextContext::Create();
130 } 130 }
131 131
132 return fNVPRTextContext; 132 return fNVPRTextContext;
133 } 133 }
134 } 134 }
135 135
136 if (!fAtlasTextContext) { 136 if (!fAtlasTextContext) {
137 fAtlasTextContext = GrAtlasTextContext::Create(fContext); 137 fAtlasTextContext = GrAtlasTextContext::Create();
138 } 138 }
139 139
140 return fAtlasTextContext; 140 return fAtlasTextContext;
141 } 141 }
142 142
143 GrDrawTarget* GrDrawingManager::newDrawTarget(GrRenderTarget* rt) { 143 GrDrawTarget* GrDrawingManager::newDrawTarget(GrRenderTarget* rt) {
144 SkASSERT(fContext); 144 SkASSERT(fContext);
145 145
146 #ifndef ENABLE_MDB 146 #ifndef ENABLE_MDB
147 // When MDB is disabled we always just return the single drawTarget 147 // When MDB is disabled we always just return the single drawTarget
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 GrDrawContext* GrDrawingManager::drawContext(GrRenderTarget* rt, 193 GrDrawContext* GrDrawingManager::drawContext(GrRenderTarget* rt,
194 const SkSurfaceProps* surfaceProps) { 194 const SkSurfaceProps* surfaceProps) {
195 if (this->abandoned()) { 195 if (this->abandoned()) {
196 return nullptr; 196 return nullptr;
197 } 197 }
198 198
199 return new GrDrawContext(fContext, this, rt, surfaceProps, fContext->getAudi tTrail(), 199 return new GrDrawContext(fContext, this, rt, surfaceProps, fContext->getAudi tTrail(),
200 fSingleOwner); 200 fSingleOwner);
201 } 201 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/text/GrAtlasTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698