/src/skia/src/gpu/ganesh/GrImageContext.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright 2019 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 | | #include "include/private/gpu/ganesh/GrImageContext.h" |
8 | | |
9 | | #include "include/core/SkRefCnt.h" |
10 | | #include "include/gpu/GrContextThreadSafeProxy.h" |
11 | | #include "src/gpu/ganesh/GrContextThreadSafeProxyPriv.h" |
12 | | |
13 | | #include <utility> |
14 | | |
15 | | GrImageContext::GrImageContext(sk_sp<GrContextThreadSafeProxy> proxy) |
16 | 2.58k | : GrContext_Base(std::move(proxy)) { |
17 | 2.58k | } |
18 | | |
19 | 2.58k | GrImageContext::~GrImageContext() {} |
20 | | |
21 | 0 | void GrImageContext::abandonContext() { |
22 | 0 | fThreadSafeProxy->priv().abandonContext(); |
23 | 0 | } |
24 | | |
25 | 1.21M | bool GrImageContext::abandoned() { |
26 | 1.21M | return fThreadSafeProxy->priv().abandoned(); |
27 | 1.21M | } |
28 | | |
29 | 0 | sk_sp<GrImageContext> GrImageContext::MakeForPromiseImage(sk_sp<GrContextThreadSafeProxy> tsp) { |
30 | 0 | return sk_sp<GrImageContext>(new GrImageContext(std::move(tsp))); |
31 | 0 | } |