Brian Osman | 45580d3 | 2016-11-23 09:37:01 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #include "GrSurfaceContext.h" |
Brian Osman | 4729914 | 2017-03-07 13:22:22 -0500 | [diff] [blame] | 9 | #include "SkColorSpace_Base.h" |
Brian Osman | 45580d3 | 2016-11-23 09:37:01 -0500 | [diff] [blame] | 10 | |
| 11 | #include "../private/GrAuditTrail.h" |
| 12 | |
| 13 | |
| 14 | // In MDB mode the reffing of the 'getLastOpList' call's result allows in-progress |
| 15 | // GrOpLists to be picked up and added to by renderTargetContexts lower in the call |
| 16 | // stack. When this occurs with a closed GrOpList, a new one will be allocated |
| 17 | // when the renderTargetContext attempts to use it (via getOpList). |
| 18 | GrSurfaceContext::GrSurfaceContext(GrContext* context, |
Robert Phillips | 7215283 | 2017-01-25 17:31:35 -0500 | [diff] [blame] | 19 | GrDrawingManager* drawingMgr, |
Robert Phillips | 2c86249 | 2017-01-18 10:08:39 -0500 | [diff] [blame] | 20 | sk_sp<SkColorSpace> colorSpace, |
Brian Osman | 45580d3 | 2016-11-23 09:37:01 -0500 | [diff] [blame] | 21 | GrAuditTrail* auditTrail, |
| 22 | GrSingleOwner* singleOwner) |
| 23 | : fContext(context) |
Robert Phillips | 2c86249 | 2017-01-18 10:08:39 -0500 | [diff] [blame] | 24 | , fColorSpace(std::move(colorSpace)) |
Brian Osman | 45580d3 | 2016-11-23 09:37:01 -0500 | [diff] [blame] | 25 | , fAuditTrail(auditTrail) |
| 26 | #ifdef SK_DEBUG |
| 27 | , fSingleOwner(singleOwner) |
| 28 | #endif |
Robert Phillips | 7215283 | 2017-01-25 17:31:35 -0500 | [diff] [blame] | 29 | , fDrawingManager(drawingMgr) { |
Brian Osman | 45580d3 | 2016-11-23 09:37:01 -0500 | [diff] [blame] | 30 | } |