Home
last modified time | relevance | path

Searched refs:chunk (Results 1 – 25 of 61) sorted by relevance

123

/frameworks/base/tools/aapt2/format/binary/
DResChunkPullParser.h55 const android::ResChunk_header* chunk() const;
71 inline static const T* ConvertTo(const android::ResChunk_header* chunk) { in ConvertTo() argument
72 if (android::util::DeviceToHost16(chunk->headerSize) < MinSize) { in ConvertTo()
75 return reinterpret_cast<const T*>(chunk); in ConvertTo()
78 inline static const uint8_t* GetChunkData(const android::ResChunk_header* chunk) { in GetChunkData() argument
79 return reinterpret_cast<const uint8_t*>(chunk) + android::util::DeviceToHost16(chunk->headerSize); in GetChunkData()
82 inline static uint32_t GetChunkDataLen(const android::ResChunk_header* chunk) { in GetChunkDataLen() argument
83 return android::util::DeviceToHost32(chunk->size) - in GetChunkDataLen()
84 android::util::DeviceToHost16(chunk->headerSize); in GetChunkDataLen()
110 inline const android::ResChunk_header* ResChunkPullParser::chunk() const { in chunk() function
DBinaryResourceParser.cpp103 if (parser.chunk()->type != android::RES_TABLE_TYPE) { in Parse()
105 "unknown chunk of type 0x%02x", static_cast<int>(parser.chunk()->type))); in Parse()
109 if (!ParseTable(parser.chunk())) { in Parse()
120 static_cast<int>(parser.chunk()->type))); in Parse()
134 bool BinaryResourceParser::ParseTable(const ResChunk_header* chunk) { in ParseTable() argument
135 const ResTable_header* table_header = ConvertTo<ResTable_header>(chunk); in ParseTable()
144 switch (android::util::DeviceToHost16(parser.chunk()->type)) { in ParseTable()
147 status_t err = value_pool_.setTo(parser.chunk(), in ParseTable()
148 android::util::DeviceToHost32(parser.chunk()->size)); in ParseTable()
163 if (!ParsePackage(parser.chunk())) { in ParseTable()
[all …]
DBinaryResourceParser.h53 bool ParseTable(const android::ResChunk_header* chunk);
54 bool ParsePackage(const android::ResChunk_header* chunk);
55 bool ParseTypeSpec(const ResourceTablePackage* package, const android::ResChunk_header* chunk,
57 bool ParseType(const ResourceTablePackage* package, const android::ResChunk_header* chunk,
59 bool ParseLibrary(const android::ResChunk_header* chunk);
60 bool ParseOverlayable(const android::ResChunk_header* chunk);
61 bool ParseStagedAliases(const android::ResChunk_header* chunk);
DChunkWriter.h37 T* chunk = buffer_->NextBlock<T>(); in StartChunk() local
38 header_ = &chunk->header; in StartChunk()
41 return chunk; in StartChunk()
/frameworks/base/services/core/java/com/android/server/broadcastradio/aidl/
DProgramInfoCache.java127 void updateFromHalProgramListChunk(ProgramListChunk chunk) { in updateFromHalProgramListChunk() argument
128 if (chunk.purge) { in updateFromHalProgramListChunk()
131 for (int i = 0; i < chunk.modified.length; i++) { in updateFromHalProgramListChunk()
133 ConversionUtils.programInfoFromHalProgramInfo(chunk.modified[i]); in updateFromHalProgramListChunk()
136 chunk.modified[i]); in updateFromHalProgramListChunk()
141 if (chunk.removed != null) { in updateFromHalProgramListChunk()
142 for (int i = 0; i < chunk.removed.length; i++) { in updateFromHalProgramListChunk()
144 ConversionUtils.identifierFromHalProgramIdentifier(chunk.removed[i])); in updateFromHalProgramListChunk()
147 mComplete = chunk.complete; in updateFromHalProgramListChunk()
200 List<ProgramList.Chunk> filterAndApplyChunk(ProgramListChunk chunk) { in filterAndApplyChunk() argument
[all …]
/frameworks/base/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/
DProgramInfoCacheTest.java106 ProgramListChunk chunk = new ProgramListChunk(); in testUpdateFromHal() local
107 chunk.purge = true; in testUpdateFromHal()
108 chunk.complete = true; in testUpdateFromHal()
109 chunk.modified.add(TestUtils.programInfoToHal(TEST_RDS_INFO)); in testUpdateFromHal()
110 chunk.modified.add(TestUtils.programInfoToHal(TEST_DAB_INFO)); in testUpdateFromHal()
111 cache.updateFromHalProgramListChunk(chunk); in testUpdateFromHal()
117 chunk.purge = false; in testUpdateFromHal()
118 chunk.complete = false; in testUpdateFromHal()
119 chunk.modified.clear(); in testUpdateFromHal()
121 chunk.modified.add(TestUtils.programInfoToHal(updatedRdsInfo)); in testUpdateFromHal()
[all …]
/frameworks/base/graphics/java/android/graphics/
DNinePatch.java103 public NinePatch(Bitmap bitmap, byte[] chunk) { in NinePatch() argument
104 this(bitmap, chunk, null); in NinePatch()
115 public NinePatch(Bitmap bitmap, byte[] chunk, String srcName) { in NinePatch() argument
118 mNativeChunk = validateNinePatchChunk(chunk); in NinePatch()
262 public native static boolean isNinePatchChunk(byte[] chunk); in isNinePatchChunk() argument
269 private static native long validateNinePatchChunk(byte[] chunk); in validateNinePatchChunk() argument
270 private static native void nativeFinalize(long chunk); in nativeFinalize() argument
271 private static native long nativeGetTransparentRegion(long bitmapHandle, long chunk, in nativeGetTransparentRegion() argument
/frameworks/base/libs/hwui/
DNinePatchUtils.h22 static inline void SetLatticeDivs(SkCanvas::Lattice* lattice, const Res_png_9patch& chunk, in SetLatticeDivs() argument
24 lattice->fXCount = chunk.numXDivs; in SetLatticeDivs()
25 lattice->fYCount = chunk.numYDivs; in SetLatticeDivs()
26 lattice->fXDivs = chunk.getXDivs(); in SetLatticeDivs()
27 lattice->fYDivs = chunk.getYDivs(); in SetLatticeDivs()
57 int numFlags, const Res_png_9patch& chunk, SkColor* colors) { in SetLatticeFlags() argument
85 uint32_t currentColor = chunk.getColors()[i++]; in SetLatticeFlags()
/frameworks/base/tools/aapt2/
DDebug.cpp612 void PrintChunkHeader(const ResChunk_header* chunk) { in PrintChunkHeader() argument
613 switch (android::util::DeviceToHost16(chunk->type)) { in PrintChunkHeader()
636 printer_->Print(StringPrintf(" chunkSize: %u", android::util::DeviceToHost32(chunk->size))); in PrintChunkHeader()
638 StringPrintf(" headerSize: %u", android::util::DeviceToHost32(chunk->headerSize))); in PrintChunkHeader()
641 bool PrintTable(const ResTable_header* chunk) { in PrintTable() argument
643 StringPrintf(" Package count: %u\n", android::util::DeviceToHost32(chunk->packageCount))); in PrintTable()
648 ResChunkPullParser(GetChunkData(&chunk->header), GetChunkDataLen(&chunk->header))); in PrintTable()
672 bool PrintTableType(const ResTable_type* chunk) { in PrintTableType() argument
673 printer_->Print(StringPrintf(" id: 0x%02x", android::util::DeviceToHost32(chunk->id))); in PrintTableType()
676 android::util::GetString(type_pool_, android::util::DeviceToHost32(chunk->id) - 1) in PrintTableType()
[all …]
/frameworks/base/tools/aapt/
Dpseudolocalize.cpp72 String16 chunk = String16(text, size, lastpos); in text() local
74 chunk = mImpl->text(chunk); in text()
77 chunk = mImpl->placeholder(chunk); in text()
79 out.append(chunk); in text()
275 String16 chunk; in text() local
277 chunk.append(&c, 1); in text()
281 chunk.append(&c, 1); in text()
287 chunk.append(&c, 1); in text()
292 result += ((c == '%') ? chunk : placeholder(chunk)); in text()
/frameworks/base/services/core/java/com/android/server/broadcastradio/hal2/
DProgramInfoCache.java111 void updateFromHalProgramListChunk(ProgramListChunk chunk) { in updateFromHalProgramListChunk() argument
112 if (chunk.purge) { in updateFromHalProgramListChunk()
115 for (android.hardware.broadcastradio.V2_0.ProgramInfo halProgramInfo : chunk.modified) { in updateFromHalProgramListChunk()
119 for (android.hardware.broadcastradio.V2_0.ProgramIdentifier halProgramId : chunk.removed) { in updateFromHalProgramListChunk()
122 mComplete = chunk.complete; in updateFromHalProgramListChunk()
174 List<ProgramList.Chunk> filterAndApplyChunk(ProgramListChunk chunk) { in filterAndApplyChunk() argument
175 return filterAndApplyChunkInternal(chunk, MAX_NUM_MODIFIED_PER_CHUNK, in filterAndApplyChunk()
181 List<ProgramList.Chunk> filterAndApplyChunkInternal(ProgramListChunk chunk, in filterAndApplyChunkInternal() argument
183 if (chunk.purge) { in filterAndApplyChunkInternal()
188 for (android.hardware.broadcastradio.V2_0.ProgramInfo halProgramInfo : chunk.modified) { in filterAndApplyChunkInternal()
[all …]
/frameworks/base/tools/aapt2/compile/
DPseudolocalizer.cpp125 std::string chunk(text.substr(lastpos, size)); in Text() local
127 chunk = impl_->Text(chunk); in Text()
129 chunk = impl_->Placeholder(chunk); in Text()
131 out.append(chunk); in Text()
369 std::string chunk; in Text() local
371 chunk.append(&c, 1); in Text()
375 chunk.append(&c, 1); in Text()
381 chunk.append(&c, 1); in Text()
386 result += ((c == '%') ? chunk : Placeholder(chunk)); in Text()
/frameworks/native/libs/binder/
DRecordedTransaction.cpp181 ChunkDescriptor chunk; in fromFile() local
200 if (!ReadFully(fd, &chunk, sizeof(ChunkDescriptor))) { in fromFile()
204 transaction_checksum_t checksum = *reinterpret_cast<transaction_checksum_t*>(&chunk); in fromFile()
214 if (chunk.dataSize > kMaxChunkDataSize) { in fromFile()
220 chunk.dataSize + PADDING8(chunk.dataSize) + sizeof(transaction_checksum_t); in fromFile()
262 switch (chunk.chunkType) { in fromFile()
264 if (chunk.dataSize != static_cast<uint32_t>(sizeof(TransactionHeader))) { in fromFile()
265 ALOGE("Header Chunk indicated size %" PRIu32 "; Expected %zu.", chunk.dataSize, in fromFile()
274 std::string(reinterpret_cast<char*>(payloadMap), chunk.dataSize); in fromFile()
279 chunk.dataSize) != android::NO_ERROR) { in fromFile()
[all …]
/frameworks/base/libs/hwui/jni/
DNinePatch.cpp58 const Res_png_9patch* chunk = reinterpret_cast<const Res_png_9patch*>(array); in isNinePatchChunk() local
59 int8_t wasDeserialized = chunk->wasDeserialized; in isNinePatchChunk()
87 Res_png_9patch* chunk = reinterpret_cast<Res_png_9patch*>(chunkHandle); in getTransparentRegion() local
88 SkASSERT(chunk); in getTransparentRegion()
98 NinePatchUtils::SetLatticeDivs(&lattice, *chunk, bitmap.width(), bitmap.height()); in getTransparentRegion()
105 if (iter.numRectsToDraw() == chunk->numColors) { in getTransparentRegion()
110 if (0 == chunk->getColors()[index++] && !iterDst.isEmpty()) { in getTransparentRegion()
/frameworks/av/media/module/extractors/mp4/
DSampleIterator.cpp91 uint32_t chunk = in seekTo() local
95 if (!mInitialized || chunk != mCurrentChunkIndex) { in seekTo()
97 if ((err = getChunkOffset(chunk, &mCurrentChunkOffset)) != OK) { in seekTo()
106 + mSamplesPerChunk * (chunk - mFirstChunk); in seekTo()
127 mCurrentChunkIndex = chunk; in seekTo()
202 status_t SampleIterator::getChunkOffset(uint32_t chunk, off64_t *offset) { in getChunkOffset() argument
205 if (chunk >= mTable->mNumChunkOffsets) { in getChunkOffset()
213 mTable->mChunkOffsetOffset + 8 + 4 * chunk, in getChunkOffset()
225 mTable->mChunkOffsetOffset + 8 + 8 * chunk, in getChunkOffset()
/frameworks/base/packages/DynamicSystemInstallationService/src/com/android/dynsystem/
DSparseInputStream.java70 SparseChunk chunk = new SparseChunk(); in readChunk() local
72 chunk.mChunkType = buf.getShort(); in readChunk()
74 chunk.mChunkSize = buf.getInt(); in readChunk()
75 chunk.mTotalSize = buf.getInt(); in readChunk()
76 return chunk; in readChunk()
/frameworks/base/libs/protoutil/src/
DProtoFileReader.cpp130 const size_t chunk = in move() local
132 mOffset += chunk; in move()
133 amt -= chunk; in move()
DEncodedBuffer.cpp227 size_t chunk = currentToWrite(); in writeRaw() local
228 if (chunk > size) { in writeRaw()
229 chunk = size; in writeRaw()
231 memcpy(target, buf, chunk); in writeRaw()
232 size -= chunk; in writeRaw()
233 buf += chunk; in writeRaw()
234 mWp.move(chunk); in writeRaw()
/frameworks/base/services/core/java/com/android/server/broadcastradio/hal1/
DTunerCallback.java168 ProgramList.Chunk chunk = new ProgramList.Chunk(true, true, modifiedSet, null); in sendProgramListUpdate() local
169 dispatch(() -> mClientCallback.onProgramListUpdated(chunk)); in sendProgramListUpdate()
173 public void onProgramListUpdated(ProgramList.Chunk chunk) { in onProgramListUpdated() argument
174 dispatch(() -> mClientCallback.onProgramListUpdated(chunk)); in onProgramListUpdated()
/frameworks/base/libs/androidfw/
DLoadedArsc.cpp454 std::unique_ptr<const LoadedPackage> LoadedPackage::Load(const Chunk& chunk, in Load() argument
464 const incfs::map_ptr<ResTable_package> header = chunk.header<ResTable_package, kMinPackageSize>(); in Load()
509 ChunkIterator iter(chunk.data_ptr(), chunk.data_size()); in Load()
716 LOG(WARNING) << StringPrintf("Unknown chunk type '%02x'.", chunk.type()); in Load()
782 LOG(WARNING) << StringPrintf("Unknown chunk type '%02x'.", chunk.type()); in Load()
804 bool LoadedArsc::LoadTable(const Chunk& chunk, const LoadedIdmap* loaded_idmap, in LoadTable() argument
806 incfs::map_ptr<ResTable_header> header = chunk.header<ResTable_header>(); in LoadTable()
825 ChunkIterator iter(chunk.data_ptr(), chunk.data_size()); in LoadTable()
867 LOG(WARNING) << StringPrintf("Unknown chunk type '%02x'.", chunk.type()); in LoadTable()
899 const Chunk chunk = iter.Next(); in Load() local
[all …]
/frameworks/base/tools/codegen/src/com/android/codegen/
DFileInfo.kt103 fun print(chunk: CodeChunk) { in <lambda>()
104 when(chunk) { in <lambda>()
107 val ast = chunk.owner.chunks in <lambda>()
129 is CodeChunk.Code -> chunk.lines.forEach { stringBuilder.appendln(it) } in <lambda>()
131 is CodeChunk.DataClass -> chunk.chunks.forEach { print(it) } in <lambda>()
/frameworks/base/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/
DProgramInfoCacheTest.java158 ProgramListChunk chunk = AidlTestUtils.makeHalChunk(/* purge= */ true, /* complete= */ true, in updateFromHalProgramListChunk_withPurgingCompleteChunk() local
163 cache.updateFromHalProgramListChunk(chunk); in updateFromHalProgramListChunk_withPurgingCompleteChunk()
175 ProgramListChunk chunk = AidlTestUtils.makeHalChunk(/* purge= */ false, in updateFromHalProgramListChunk_withNonPurgingIncompleteChunk() local
182 cache.updateFromHalProgramListChunk(chunk); in updateFromHalProgramListChunk_withNonPurgingIncompleteChunk()
196 ProgramListChunk chunk = AidlTestUtils.makeHalChunk(/* purge= */ false, in updateFromHalProgramListChunk_withInvalidChunk() local
200 cache.updateFromHalProgramListChunk(chunk); in updateFromHalProgramListChunk_withInvalidChunk()
471 ProgramList.Chunk chunk = chunks.get(i); in verifyChunkListPurge() local
475 .that(chunk.isPurge()).isEqualTo(expectedPurge); in verifyChunkListPurge()
484 ProgramList.Chunk chunk = chunks.get(i); in verifyChunkListComplete() local
488 .that(chunk.isComplete()).isEqualTo(expectedComplete); in verifyChunkListComplete()
/frameworks/native/libs/debugstore/rust/src/
Dlib.rs68 .filter_map(|chunk| match chunk { in cxx_vec_to_pairs()
/frameworks/base/libs/androidfw/include/androidfw/
DChunk.h39 explicit Chunk(incfs::verified_map_ptr<ResChunk_header> chunk) : device_chunk_(chunk) {} in Chunk() argument
/frameworks/base/libs/hwui/pipeline/skia/
DSkiaRecordingCanvas.cpp298 void SkiaRecordingCanvas::drawNinePatch(Bitmap& bitmap, const Res_png_9patch& chunk, float dstLeft, in drawNinePatch() argument
302 NinePatchUtils::SetLatticeDivs(&lattice, chunk, bitmap.width(), bitmap.height()); in drawNinePatch()
307 if (chunk.numColors > 0 && chunk.numColors == NinePatchUtils::NumDistinctRects(lattice)) { in drawNinePatch()
318 NinePatchUtils::SetLatticeFlags(&lattice, flags.data(), numFlags, chunk, colors.data()); in drawNinePatch()

123