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

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

Issue 2448593002: Remove SkAutoTUnref and SkAutoTDelete from public includes. (Closed)
Patch Set: And Vulcan. Created 4 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/GrAuditTrail.cpp ('k') | src/gpu/GrContextPriv.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 2011 Google Inc. 2 * Copyright 2011 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 "GrContext.h" 8 #include "GrContext.h"
9 #include "GrContextPriv.h" 9 #include "GrContextPriv.h"
10 #include "GrContextOptions.h" 10 #include "GrContextOptions.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } 125 }
126 126
127 delete fResourceProvider; 127 delete fResourceProvider;
128 delete fResourceCache; 128 delete fResourceCache;
129 delete fBatchFontCache; 129 delete fBatchFontCache;
130 130
131 fGpu->unref(); 131 fGpu->unref();
132 fCaps->unref(); 132 fCaps->unref();
133 } 133 }
134 134
135 GrContextThreadSafeProxy* GrContext::threadSafeProxy() { 135 sk_sp<GrContextThreadSafeProxy> GrContext::threadSafeProxy() {
136 if (!fThreadSafeProxy) { 136 if (!fThreadSafeProxy) {
137 fThreadSafeProxy.reset(new GrContextThreadSafeProxy(fCaps, this->uniqueI D())); 137 fThreadSafeProxy.reset(new GrContextThreadSafeProxy(sk_ref_sp(fCaps), th is->uniqueID()));
138 } 138 }
139 return SkRef(fThreadSafeProxy.get()); 139 return fThreadSafeProxy;
140 } 140 }
141 141
142 void GrContext::abandonContext() { 142 void GrContext::abandonContext() {
143 ASSERT_SINGLE_OWNER 143 ASSERT_SINGLE_OWNER
144 144
145 fResourceProvider->abandon(); 145 fResourceProvider->abandon();
146 146
147 // Need to abandon the drawing manager first so all the render targets 147 // Need to abandon the drawing manager first so all the render targets
148 // will be released/forgotten before they too are abandoned. 148 // will be released/forgotten before they too are abandoned.
149 fDrawingManager->abandon(); 149 fDrawingManager->abandon();
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 ASSERT_SINGLE_OWNER 834 ASSERT_SINGLE_OWNER
835 fResourceCache->setLimits(maxTextures, maxTextureBytes); 835 fResourceCache->setLimits(maxTextures, maxTextureBytes);
836 } 836 }
837 837
838 ////////////////////////////////////////////////////////////////////////////// 838 //////////////////////////////////////////////////////////////////////////////
839 839
840 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { 840 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const {
841 ASSERT_SINGLE_OWNER 841 ASSERT_SINGLE_OWNER
842 fResourceCache->dumpMemoryStatistics(traceMemoryDump); 842 fResourceCache->dumpMemoryStatistics(traceMemoryDump);
843 } 843 }
OLDNEW
« no previous file with comments | « src/gpu/GrAuditTrail.cpp ('k') | src/gpu/GrContextPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698