blob: 5f1e238923edb339d1cbfcdb8f1d9c8ca8759c64 [file] [log] [blame]
Romain Guy3b748a42013-04-17 18:54:38 -07001/**
2 * Copyright (c) 2013, 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.view;
18
19import android.view.GraphicBuffer;
20
21/**
22 * Programming interface to the system assets atlas. This atlas, when
23 * present, holds preloaded drawable in a single, shareable graphics
24 * buffer. This allows multiple processes to share the same data to
25 * save up on memory.
26 *
27 * @hide
28 */
29interface IAssetAtlas {
30 /**
Romain Guy80b12fc2013-05-29 15:54:25 -070031 * Indicates whether the atlas is compatible with the specified
32 * parent process id. If the atlas' ppid does not match, this
33 * method will return false.
34 */
35 boolean isCompatible(int ppid);
36
37 /**
Romain Guy3b748a42013-04-17 18:54:38 -070038 * Returns the atlas buffer (texture) or null if the atlas is
39 * not available yet.
40 */
41 GraphicBuffer getBuffer();
42
43 /**
44 * Returns the map of the bitmaps stored in the atlas or null
45 * if the atlas is not available yet.
46 *
47 * Each bitmap is represented by several entries in the array:
48 * int0: SkBitmap*, the native bitmap object
49 * int1: x position
50 * int2: y position
51 * int3: rotated, 1 if the bitmap must be rotated, 0 otherwise
52 */
53 int[] getMap();
54}