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

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

Issue 1565313003: Revert of Add guards to GrTextureProvider (Closed) Base URL: https://skia.googlesource.com/skia.git@gpudeviceguards
Patch Set: Created 4 years, 11 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/GrResourceProvider.h ('k') | src/gpu/GrTextureProvider.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 "GrResourceProvider.h" 8 #include "GrResourceProvider.h"
9 9
10 #include "GrGpu.h" 10 #include "GrGpu.h"
11 #include "GrIndexBuffer.h" 11 #include "GrIndexBuffer.h"
12 #include "GrPathRendering.h" 12 #include "GrPathRendering.h"
13 #include "GrRenderTarget.h" 13 #include "GrRenderTarget.h"
14 #include "GrRenderTargetPriv.h" 14 #include "GrRenderTargetPriv.h"
15 #include "GrResourceCache.h" 15 #include "GrResourceCache.h"
16 #include "GrResourceKey.h" 16 #include "GrResourceKey.h"
17 #include "GrStencilAttachment.h" 17 #include "GrStencilAttachment.h"
18 #include "GrVertexBuffer.h" 18 #include "GrVertexBuffer.h"
19 19
20 GR_DECLARE_STATIC_UNIQUE_KEY(gQuadIndexBufferKey); 20 GR_DECLARE_STATIC_UNIQUE_KEY(gQuadIndexBufferKey);
21 21
22 GrResourceProvider::GrResourceProvider(GrGpu* gpu, GrResourceCache* cache, GrSin gleOwner* owner) 22 GrResourceProvider::GrResourceProvider(GrGpu* gpu, GrResourceCache* cache) : INH ERITED(gpu, cache) {
23 : INHERITED(gpu, cache, owner) {
24 GR_DEFINE_STATIC_UNIQUE_KEY(gQuadIndexBufferKey); 23 GR_DEFINE_STATIC_UNIQUE_KEY(gQuadIndexBufferKey);
25 fQuadIndexBufferKey = gQuadIndexBufferKey; 24 fQuadIndexBufferKey = gQuadIndexBufferKey;
26 } 25 }
27 26
28 const GrIndexBuffer* GrResourceProvider::createInstancedIndexBuffer(const uint16 _t* pattern, 27 const GrIndexBuffer* GrResourceProvider::createInstancedIndexBuffer(const uint16 _t* pattern,
29 int patternS ize, 28 int patternS ize,
30 int reps, 29 int reps,
31 int vertCoun t, 30 int vertCoun t,
32 const GrUniq ueKey& key) { 31 const GrUniq ueKey& key) {
33 size_t bufferSize = patternSize * reps * sizeof(uint16_t); 32 size_t bufferSize = patternSize * reps * sizeof(uint16_t);
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // FBO. But iOS doesn't allow a stencil-only FBO. It reports uns upported 220 // FBO. But iOS doesn't allow a stencil-only FBO. It reports uns upported
222 // FBO status. 221 // FBO status.
223 this->gpu()->clearStencil(rt); 222 this->gpu()->clearStencil(rt);
224 } 223 }
225 } 224 }
226 } 225 }
227 return rt->renderTargetPriv().getStencilAttachment(); 226 return rt->renderTargetPriv().getStencilAttachment();
228 } 227 }
229 228
230 229
OLDNEW
« no previous file with comments | « src/gpu/GrResourceProvider.h ('k') | src/gpu/GrTextureProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698