diff options
author | Jesse Hall | 2017-03-24 15:16:27 -0500 |
---|---|---|
committer | Jesse Hall | 2017-03-28 10:22:54 -0500 |
commit | 33eab3a829fee3bc89e435e10ec581d87d68797c (patch) | |
tree | 3a3d0370ad36d21b69b02e74d02665d109249e68 /libgrallocusage/Android.bp | |
parent | 94f3ca87767fe84163012638053bf79ce01f693a (diff) | |
download | platform-system-core-33eab3a829fee3bc89e435e10ec581d87d68797c.tar.gz platform-system-core-33eab3a829fee3bc89e435e10ec581d87d68797c.tar.xz platform-system-core-33eab3a829fee3bc89e435e10ec581d87d68797c.zip |
Add gralloc usage conversion functions
Converting gralloc1 / ..graphics.allocator@2.0 usage to gralloc0 usage
requires more than just ORing bits and truncating: the CPU_READ_OFTEN
bits don't match up correctly. Add utility functions for converting
back and forth which handle this properly.
Test: boot bullhead-eng
Change-Id: I1cee972feaea486d5607c60acead2e870c2c9549
Diffstat (limited to 'libgrallocusage/Android.bp')
-rw-r--r-- | libgrallocusage/Android.bp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/libgrallocusage/Android.bp b/libgrallocusage/Android.bp new file mode 100644 index 000000000..54bfee5c4 --- /dev/null +++ b/libgrallocusage/Android.bp | |||
@@ -0,0 +1,29 @@ | |||
1 | // Copyright 2017 The Android Open Source Project | ||
2 | // | ||
3 | // Licensed under the Apache License, Version 2.0 (the "License"); | ||
4 | // you may not use this file except in compliance with the License. | ||
5 | // You may obtain a copy of the License at | ||
6 | // | ||
7 | // http://www.apache.org/licenses/LICENSE-2.0 | ||
8 | // | ||
9 | // Unless required by applicable law or agreed to in writing, software | ||
10 | // distributed under the License is distributed on an "AS IS" BASIS, | ||
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
12 | // See the License for the specific language governing permissions and | ||
13 | // limitations under the License. | ||
14 | |||
15 | cc_library_static { | ||
16 | name: "libgrallocusage", | ||
17 | cppflags: [ | ||
18 | "-Weverything", | ||
19 | "-Werror", | ||
20 | "-Wno-c++98-compat-pedantic", | ||
21 | // Hide errors in headers we include | ||
22 | "-Wno-global-constructors", | ||
23 | "-Wno-exit-time-destructors", | ||
24 | "-Wno-padded", | ||
25 | ], | ||
26 | srcs: ["GrallocUsageConversion.cpp"], | ||
27 | export_include_dirs: ["include"], | ||
28 | shared_libs: ["android.hardware.graphics.allocator@2.0"], | ||
29 | } | ||