Home | History | Annotate | Download | only in view
      1 /**
      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 
     17 package android.view;
     18 
     19 import 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  */
     29 interface IAssetAtlas {
     30     /**
     31      * 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     /**
     38      * 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      * long0: SkBitmap*, the native bitmap object
     49      * long1: x position
     50      * long2: y position
     51      * long3: rotated, 1 if the bitmap must be rotated, 0 otherwise
     52      */
     53     long[] getMap();
     54 }
     55