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

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

Issue 1904723003: Revert of Use transfer buffer for BatchAtlas texture copies (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/GrGpu.cpp ('k') | src/gpu/batches/GrDrawBatch.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 "GrResourceProvider.h" 8 #include "GrResourceProvider.h"
9 9
10 #include "GrBuffer.h" 10 #include "GrBuffer.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 desc.fConfig = config; 132 desc.fConfig = config;
133 133
134 // We don't want to flush the context so we claim we're in the middle of flu shing so as to 134 // We don't want to flush the context so we claim we're in the middle of flu shing so as to
135 // guarantee we do not recieve a texture with pending IO 135 // guarantee we do not recieve a texture with pending IO
136 // TODO: Determine how to avoid having to do this. (https://bug.skia.org/415 6) 136 // TODO: Determine how to avoid having to do this. (https://bug.skia.org/415 6)
137 static const uint32_t kFlags = GrResourceProvider::kNoPendingIO_Flag; 137 static const uint32_t kFlags = GrResourceProvider::kNoPendingIO_Flag;
138 GrTexture* texture = this->createApproxTexture(desc, kFlags); 138 GrTexture* texture = this->createApproxTexture(desc, kFlags);
139 if (!texture) { 139 if (!texture) {
140 return nullptr; 140 return nullptr;
141 } 141 }
142 GrBatchAtlas* atlas = new GrBatchAtlas(this, texture, 142 GrBatchAtlas* atlas = new GrBatchAtlas(texture, numPlotsX, numPlotsY);
143 numPlotsX, numPlotsY);
144 atlas->registerEvictionCallback(func, data); 143 atlas->registerEvictionCallback(func, data);
145 return atlas; 144 return atlas;
146 } 145 }
147 146
148 GrStencilAttachment* GrResourceProvider::attachStencilAttachment(GrRenderTarget* rt) { 147 GrStencilAttachment* GrResourceProvider::attachStencilAttachment(GrRenderTarget* rt) {
149 SkASSERT(rt); 148 SkASSERT(rt);
150 if (rt->renderTargetPriv().getStencilAttachment()) { 149 if (rt->renderTargetPriv().getStencilAttachment()) {
151 return rt->renderTargetPriv().getStencilAttachment(); 150 return rt->renderTargetPriv().getStencilAttachment();
152 } 151 }
153 152
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 return rt->renderTargetPriv().getStencilAttachment(); 191 return rt->renderTargetPriv().getStencilAttachment();
193 } 192 }
194 193
195 GrRenderTarget* GrResourceProvider::wrapBackendTextureAsRenderTarget( 194 GrRenderTarget* GrResourceProvider::wrapBackendTextureAsRenderTarget(
196 const GrBackendTextureDesc& desc) { 195 const GrBackendTextureDesc& desc) {
197 if (this->isAbandoned()) { 196 if (this->isAbandoned()) {
198 return nullptr; 197 return nullptr;
199 } 198 }
200 return this->gpu()->wrapBackendTextureAsRenderTarget(desc); 199 return this->gpu()->wrapBackendTextureAsRenderTarget(desc);
201 } 200 }
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/batches/GrDrawBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698