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

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

Issue 1738513002: start on pre-upload data (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: stuff Created 4 years, 9 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 | « include/gpu/GrContext.h ('k') | src/gpu/SkGr.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 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 "GrContextOptions.h" 9 #include "GrContextOptions.h"
10 #include "GrDrawingManager.h" 10 #include "GrDrawingManager.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 120 }
121 121
122 delete fResourceProvider; 122 delete fResourceProvider;
123 delete fResourceCache; 123 delete fResourceCache;
124 delete fBatchFontCache; 124 delete fBatchFontCache;
125 125
126 fGpu->unref(); 126 fGpu->unref();
127 fCaps->unref(); 127 fCaps->unref();
128 } 128 }
129 129
130 GrContextThreadSafeProxy* GrContext::threadSafeProxy() {
131 if (!fThreadSafeProxy) {
132 fThreadSafeProxy.reset(new GrContextThreadSafeProxy(fCaps, this->uniqueI D()));
133 }
134 return fThreadSafeProxy;
135 }
136
130 void GrContext::abandonContext() { 137 void GrContext::abandonContext() {
131 ASSERT_SINGLE_OWNER 138 ASSERT_SINGLE_OWNER
132 139
133 fResourceProvider->abandon(); 140 fResourceProvider->abandon();
134 141
135 // Need to abandon the drawing manager first so all the render targets 142 // Need to abandon the drawing manager first so all the render targets
136 // will be released/forgotten before they too are abandoned. 143 // will be released/forgotten before they too are abandoned.
137 fDrawingManager->abandon(); 144 fDrawingManager->abandon();
138 145
139 // abandon first to so destructors 146 // abandon first to so destructors
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 ASSERT_SINGLE_OWNER 669 ASSERT_SINGLE_OWNER
663 fResourceCache->setLimits(maxTextures, maxTextureBytes); 670 fResourceCache->setLimits(maxTextures, maxTextureBytes);
664 } 671 }
665 672
666 ////////////////////////////////////////////////////////////////////////////// 673 //////////////////////////////////////////////////////////////////////////////
667 674
668 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const { 675 void GrContext::dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const {
669 ASSERT_SINGLE_OWNER 676 ASSERT_SINGLE_OWNER
670 fResourceCache->dumpMemoryStatistics(traceMemoryDump); 677 fResourceCache->dumpMemoryStatistics(traceMemoryDump);
671 } 678 }
OLDNEW
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698