summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/mapper/2.1/IMapper.hal')
-rw-r--r--graphics/mapper/2.1/IMapper.hal61
1 files changed, 61 insertions, 0 deletions
diff --git a/graphics/mapper/2.1/IMapper.hal b/graphics/mapper/2.1/IMapper.hal
new file mode 100644
index 00000000..a23656d4
--- /dev/null
+++ b/graphics/mapper/2.1/IMapper.hal
@@ -0,0 +1,61 @@
1/*
2 * Copyright 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hardware.graphics.mapper@2.1;
18
19import android.hardware.graphics.mapper@2.0::Error;
20import android.hardware.graphics.mapper@2.0::IMapper;
21
22interface IMapper extends android.hardware.graphics.mapper@2.0::IMapper {
23 /**
24 * Validate that the buffer can be safely accessed by a caller who assumes
25 * the specified descriptorInfo and stride. This must at least validate
26 * that the buffer size is large enough. Validating the buffer against
27 * individual buffer attributes is optional.
28 *
29 * @param buffer is the buffer to validate against.
30 * @param descriptorInfo specifies the attributes of the buffer.
31 * @param stride is the buffer stride returned by IAllocator::allocate.
32 * @return error is NONE upon success. Otherwise,
33 * BAD_BUFFER when the buffer is invalid.
34 * BAD_VALUE when buffer cannot be safely accessed
35 */
36 validateBufferSize(pointer buffer,
37 BufferDescriptorInfo descriptorInfo,
38 uint32_t stride)
39 generates (Error error);
40
41 /**
42 * Get the transport size of a buffer. An imported buffer handle is a raw
43 * buffer handle with the process-local runtime data appended. This
44 * function, for example, allows a caller to omit the process-local
45 * runtime data at the tail when serializing the imported buffer handle.
46 *
47 * Note that a client might or might not omit the process-local runtime
48 * data when sending an imported buffer handle. The mapper must support
49 * both cases on the receiving end.
50 *
51 * @param buffer is the buffer to get the transport size from.
52 * @return error is NONE upon success. Otherwise,
53 * BAD_BUFFER when the buffer is invalid.
54 * @return numFds is the number of file descriptors needed for transport.
55 * @return numInts is the number of integers needed for transport.
56 */
57 getTransportSize(pointer buffer)
58 generates (Error error,
59 uint32_t numFds,
60 uint32_t numInts);
61};