diff options
author | John Reck <jreck@google.com> | 2018-05-07 08:12:07 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2018-05-09 11:39:37 -0700 |
commit | e170fb6686c3e88cee6e32f4e3eb12fcf9bfe931 (patch) | |
tree | bf0ccbbcd2f89ccb468b216e14670451fedc3221 /libs/hwui/HardwareBitmapUploader.h | |
parent | 33f4f1cb1645635f8b5c369e1dddda84e0396c34 (diff) |
A better HW Bitmap uploader
Move all HW bitmap upload operations off of RenderThread.
Ensure EGL context outlives all upload requests
Bug: 79250950
Test: builds, boots, systrace is good, CTS bitmap tests pass
Change-Id: I5ace6c516d33b1afdf1a407cd8b183f6b60c22c1
Diffstat (limited to 'libs/hwui/HardwareBitmapUploader.h')
-rw-r--r-- | libs/hwui/HardwareBitmapUploader.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libs/hwui/HardwareBitmapUploader.h b/libs/hwui/HardwareBitmapUploader.h new file mode 100644 index 000000000000..c0113d81fefb --- /dev/null +++ b/libs/hwui/HardwareBitmapUploader.h @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2018 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include <hwui/Bitmap.h> + +namespace android::uirenderer { + +class HardwareBitmapUploader { +public: + static sk_sp<Bitmap> allocateHardwareBitmap(const SkBitmap& sourceBitmap); +}; + +}; // namespace android::uirenderer |