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

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

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

Powered by Google App Engine
This is Rietveld 408576698