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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 context->initMockContext(); | 281 context->initMockContext(); |
282 return context; | 282 return context; |
283 } | 283 } |
284 | 284 |
285 void GrContext::initMockContext() { | 285 void GrContext::initMockContext() { |
286 GrContextOptions options; | 286 GrContextOptions options; |
287 options.fGeometryBufferMapThreshold = 0; | 287 options.fGeometryBufferMapThreshold = 0; |
288 SkASSERT(nullptr == fGpu); | 288 SkASSERT(nullptr == fGpu); |
289 fGpu = new MockGpu(this, options); | 289 fGpu = new MockGpu(this, options); |
290 SkASSERT(fGpu); | 290 SkASSERT(fGpu); |
291 this->initCommon(); | 291 this->initCommon(options); |
292 | 292 |
293 // We delete these because we want to test the cache starting with zero reso
urces. Also, none of | 293 // We delete these because we want to test the cache starting with zero reso
urces. Also, none of |
294 // these objects are required for any of tests that use this context. TODO:
make stop allocating | 294 // these objects are required for any of tests that use this context. TODO:
make stop allocating |
295 // resources in the buffer pools. | 295 // resources in the buffer pools. |
296 fDrawingManager->abandon(); | 296 fDrawingManager->abandon(); |
297 } | 297 } |
OLD | NEW |