| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "GrContext.h" | 10 #include "GrContext.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 fResourceCache = NULL; | 103 fResourceCache = NULL; |
| 104 fFontCache = NULL; | 104 fFontCache = NULL; |
| 105 fDrawBuffer = NULL; | 105 fDrawBuffer = NULL; |
| 106 fDrawBufferVBAllocPool = NULL; | 106 fDrawBufferVBAllocPool = NULL; |
| 107 fDrawBufferIBAllocPool = NULL; | 107 fDrawBufferIBAllocPool = NULL; |
| 108 fFlushToReduceCacheSize = false; | 108 fFlushToReduceCacheSize = false; |
| 109 fAARectRenderer = NULL; | 109 fAARectRenderer = NULL; |
| 110 fOvalRenderer = NULL; | 110 fOvalRenderer = NULL; |
| 111 fViewMatrix.reset(); | 111 fViewMatrix.reset(); |
| 112 fMaxTextureSizeOverride = 1 << 20; | 112 fMaxTextureSizeOverride = 1 << 20; |
| 113 fGpuTracingEnabled = false; | |
| 114 } | 113 } |
| 115 | 114 |
| 116 bool GrContext::init(GrBackend backend, GrBackendContext backendContext) { | 115 bool GrContext::init(GrBackend backend, GrBackendContext backendContext) { |
| 117 SkASSERT(NULL == fGpu); | 116 SkASSERT(NULL == fGpu); |
| 118 | 117 |
| 119 fGpu = GrGpu::Create(backend, backendContext, this); | 118 fGpu = GrGpu::Create(backend, backendContext, this); |
| 120 if (NULL == fGpu) { | 119 if (NULL == fGpu) { |
| 121 return false; | 120 return false; |
| 122 } | 121 } |
| 123 | 122 |
| (...skipping 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1920 fDrawBuffer->removeGpuTraceMarker(marker); | 1919 fDrawBuffer->removeGpuTraceMarker(marker); |
| 1921 } | 1920 } |
| 1922 } | 1921 } |
| 1923 | 1922 |
| 1924 /////////////////////////////////////////////////////////////////////////////// | 1923 /////////////////////////////////////////////////////////////////////////////// |
| 1925 #if GR_CACHE_STATS | 1924 #if GR_CACHE_STATS |
| 1926 void GrContext::printCacheStats() const { | 1925 void GrContext::printCacheStats() const { |
| 1927 fResourceCache->printStats(); | 1926 fResourceCache->printStats(); |
| 1928 } | 1927 } |
| 1929 #endif | 1928 #endif |
| OLD | NEW |