diff options
author | Adlai Holler <adlai@google.com> | 2020-07-27 11:42:45 -0400 |
---|---|---|
committer | Adlai Holler <adlai@google.com> | 2020-07-28 09:18:33 -0400 |
commit | f8c434eb7a374f8a9df408c143d364683c6f40af (patch) | |
tree | a8fa4edbb00a2fa48706e815c87440b07248f0a2 /libs/hwui/Readback.cpp | |
parent | b2991250aad9b7b9c0a5e038f5458d94e56c5d48 (diff) |
Migrate from GrContext to GrDirectContext
This is part of an effort to distinguish between different types of
contexts in GPU Skia. When using a DeferredDisplayList (DDL)
recorder, the context you get is not a direct context and cannot
be used for operations like uploading or reading textures.
Since Android does not use DDLs, it is not directly affected by this
change but other APIs, such as SkImage::MakeFromTexture are
being migrated to require a GrDirectContext to increase sanity.
Change-Id: I9afbdf3c026a9f9cb6ad2aad904915e189e584d6
Diffstat (limited to 'libs/hwui/Readback.cpp')
-rw-r--r-- | libs/hwui/Readback.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/Readback.cpp b/libs/hwui/Readback.cpp index 0dea354b7200..b71bb07dbc86 100644 --- a/libs/hwui/Readback.cpp +++ b/libs/hwui/Readback.cpp @@ -118,7 +118,7 @@ CopyResult Readback::copyImageInto(const sk_sp<SkImage>& image, Matrix4& texTran } int imgWidth = image->width(); int imgHeight = image->height(); - sk_sp<GrContext> grContext = sk_ref_sp(mRenderThread.getGrContext()); + sk_sp<GrDirectContext> grContext = sk_ref_sp(mRenderThread.getGrContext()); if (bitmap->colorType() == kRGBA_F16_SkColorType && !grContext->colorTypeSupportedAsSurface(bitmap->colorType())) { |