OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 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 #include "GrTest.h" | 9 #include "GrTest.h" |
10 | 10 |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 context->initMockContext(); | 311 context->initMockContext(); |
312 return context; | 312 return context; |
313 } | 313 } |
314 | 314 |
315 void GrContext::initMockContext() { | 315 void GrContext::initMockContext() { |
316 GrContextOptions options; | 316 GrContextOptions options; |
317 options.fGeometryBufferMapThreshold = 0; | 317 options.fGeometryBufferMapThreshold = 0; |
318 SkASSERT(nullptr == fGpu); | 318 SkASSERT(nullptr == fGpu); |
319 fGpu = new MockGpu(this, options); | 319 fGpu = new MockGpu(this, options); |
320 SkASSERT(fGpu); | 320 SkASSERT(fGpu); |
321 this->initCommon(); | 321 this->initCommon(options); |
322 | 322 |
323 // We delete these because we want to test the cache starting with zero reso
urces. Also, none of | 323 // We delete these because we want to test the cache starting with zero reso
urces. Also, none of |
324 // these objects are required for any of tests that use this context. TODO:
make stop allocating | 324 // these objects are required for any of tests that use this context. TODO:
make stop allocating |
325 // resources in the buffer pools. | 325 // resources in the buffer pools. |
326 fDrawingManager->abandon(); | 326 fDrawingManager->abandon(); |
327 } | 327 } |
OLD | NEW |