Lines Matching refs:chunk

59      * in the cache, using a {@link SoftReference} for the chunk. The default Java classes
69 private byte[] chunk;
75 * Serializes the given chunk.
77 * @return the serialized data for the chunk.
79 public static byte[] serialize(NinePatchChunk chunk) {
80 // serialize the chunk to get a byte[]
85 oos.writeObject(chunk);
100 sChunkCache.put(array, new SoftReference<NinePatchChunk>(chunk));
107 * If the chunk is present in the cache then the object from the cache is returned, otherwise
110 * @param array the serialized representation of the chunk.
115 NinePatchChunk chunk = chunkRef.get();
116 if (chunk == null) {
121 chunk = (NinePatchChunk) ois.readObject();
123 // put back the chunk in the cache
124 if (chunk != null) {
125 sChunkCache.put(array, new SoftReference<NinePatchChunk>(chunk));
145 return chunk;
151 /*package*/ static boolean isNinePatchChunk(byte[] chunk) {
152 NinePatchChunk chunkObject = getChunk(chunk);
158 /*package*/ static long validateNinePatchChunk(byte[] chunk) {
163 newDelegate.chunk = chunk;
168 /*package*/ static void nativeFinalize(long chunk) {
169 sManager.removeJavaReferenceFor(chunk);
174 long chunk, long paint_instance_or_null, int destDensity, int srcDensity) {
177 bitmap_instance, chunk, paint_instance_or_null,
183 long chunk, long paint_instance_or_null, int destDensity, int srcDensity) {
186 bitmap_instance, chunk, paint_instance_or_null,
191 /*package*/ static long nativeGetTransparentRegion(Bitmap bitmap, long chunk, Rect location) {
199 Bitmap bitmap_instance, long chunk, long paint_instance_or_null,
208 NinePatch_Delegate delegate = sManager.getDelegate(chunk);
210 c = delegate.chunk;