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

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

Issue 1421853002: Add immediate mode option for gpu configs in dm (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add assert Created 5 years, 1 month 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/GrTest.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 "GrAtlasTextContext.h" 8 #include "GrAtlasTextContext.h"
9 #include "GrDrawContext.h" 9 #include "GrDrawContext.h"
10 #include "GrDrawingManager.h" 10 #include "GrDrawingManager.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 #ifndef ENABLE_MDB 99 #ifndef ENABLE_MDB
100 // When MDB is disabled we always just return the single drawTarget 100 // When MDB is disabled we always just return the single drawTarget
101 if (fDrawTargets.count()) { 101 if (fDrawTargets.count()) {
102 SkASSERT(fDrawTargets.count() == 1); 102 SkASSERT(fDrawTargets.count() == 1);
103 // DrawingManager gets the creation ref - this ref is for the caller 103 // DrawingManager gets the creation ref - this ref is for the caller
104 return SkRef(fDrawTargets[0]); 104 return SkRef(fDrawTargets[0]);
105 } 105 }
106 #endif 106 #endif
107 107
108 GrDrawTarget* dt = new GrDrawTarget(fContext->getGpu(), fContext->resourcePr ovider()); 108 GrDrawTarget* dt = new GrDrawTarget(fContext->getGpu(), fContext->resourcePr ovider(),
109 fOptions);
109 110
110 *fDrawTargets.append() = dt; 111 *fDrawTargets.append() = dt;
111 112
112 // DrawingManager gets the creation ref - this ref is for the caller 113 // DrawingManager gets the creation ref - this ref is for the caller
113 return SkRef(dt); 114 return SkRef(dt);
114 } 115 }
115 116
116 GrDrawContext* GrDrawingManager::drawContext(GrRenderTarget* rt, 117 GrDrawContext* GrDrawingManager::drawContext(GrRenderTarget* rt,
117 const SkSurfaceProps* surfaceProps) { 118 const SkSurfaceProps* surfaceProps) {
118 if (this->abandoned()) { 119 if (this->abandoned()) {
119 return nullptr; 120 return nullptr;
120 } 121 }
121 122
122 return new GrDrawContext(this, rt, surfaceProps); 123 return new GrDrawContext(this, rt, surfaceProps);
123 } 124 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawingManager.h ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698