/external/skia/src/utils/ |
H A D | SkTextureCompressor.cpp | 37 void GetBlockDimensions(Format format, int* dimX, int* dimY, bool matchSpec) { argument 38 if (nullptr == dimX || nullptr == dimY) { 42 if (!matchSpec && SkOpts::fill_block_dimensions(format, dimX, dimY)) { 70 *dimX = kFormatDimensions[format].fBlockSizeX; 75 int dimX, dimY; local 76 GetBlockDimensions(fmt, &dimX, &dimY, true); 111 if(((width % dimX) == 0) && ((height % dimY) == 0)) { 112 const int blocksX = width / dimX; 185 int dimX, dimY; local 186 GetBlockDimensions(format, &dimX, [all...] |
H A D | SkTextureCompressor_ASTC.cpp | 1069 // about the block. dimX and dimY are the dimension in texels of the block, 1075 ASTCDecompressionData(int dimX, int dimY) : fDimX(dimX), fDimY(dimY) { } 596 SkASSERT(nBits < 8); m[0] = static_cast<int>(blockBits(nBits - 1, 0)); m[1] = static_cast<int>(blockBits(2*nBits - 1 + 2, nBits + 2)); m[2] = static_cast<int>(blockBits(3*nBits - 1 + 4, 2*nBits + 4)); m[3] = static_cast<int>(blockBits(4*nBits - 1 + 5, 3*nBits + 5)); m[4] = static_cast<int>(blockBits(5*nBits - 1 + 7, 4*nBits + 7)); } int T = static_cast<int>(blockBits(nBits + 1, nBits)) | (static_cast<int>(blockBits(2*nBits + 2 + 1, 2*nBits + 2)) << 2) | (static_cast<int>(blockBits[3*nBits + 4] << 4)) | (static_cast<int>(blockBits(4*nBits + 5 + 1, 4*nBits + 5)) << 5) | (static_cast<int>(blockBits[5*nBits + 7] << 7)); int t[5]; int C; SkTBits<int> Tbits(T); if (0x7 == Tbits(4, 2)) { C = (Tbits(7, 5) << 2) | Tbits(1, 0); t[3] = t[4] = 2; } else { C = Tbits(4, 0); if (Tbits(6, 5) == 0x3) { t[4] = 2; t[3] = Tbits[7]; } else { t[4] = Tbits[7]; t[3] = Tbits(6, 5); } } SkTBits<int> Cbits(C); if (Cbits(1, 0) == 0x3) { t[2] = 2; t[1] = Cbits[4]; t[0] = (Cbits[3] << 1) | (Cbits[2] & (0x1 & ~(Cbits[3]))); } else if (Cbits(3, 2) == 0x3) { t[2] = 2; t[1] = 2; t[0] = Cbits(1, 0); } else { t[2] = Cbits[4]; t[1] = Cbits(3, 2); t[0] = (Cbits[1] << 1) | (Cbits[0] & (0x1 & ~(Cbits[1]))); } for (int i = 0; i < 5; ++i) { SkASSERT(t[i] < 3); SkASSERT(m[i] < (1 << nBits)); } for (int i = 0; i < 5; ++i) { *dst = (t[i] << nBits) + m[i]; ++dst; } } static void decode_quint_block(int* dst, int nBits, const uint64_t &block) { SkTBits<uint64_t> blockBits(block); int m[3]; if (0 == nBits) { memset(m, 0, sizeof(m)); } else { SkASSERT(nBits < 8); m[0] = static_cast<int>(blockBits(nBits - 1, 0)); m[1] = static_cast<int>(blockBits(2*nBits - 1 + 3, nBits + 3)); m[2] = static_cast<int>(blockBits(3*nBits - 1 + 5, 2*nBits + 5)); } int Q = static_cast<int>(blockBits(nBits + 2, nBits)) | (static_cast<int>(blockBits(2*nBits + 3 + 1, 2*nBits + 3)) << 3) | (static_cast<int>(blockBits(3*nBits + 5 + 1, 3*nBits + 5)) << 5); int q[3]; SkTBits<int> Qbits(Q); if (Qbits(2, 1) == 0x3 && Qbits(6, 5) == 0) { const int notBitZero = (0x1 & ~(Qbits[0])); q[2] = (Qbits[0] << 2) | ((Qbits[4] & notBitZero) << 1) | (Qbits[3] & notBitZero); q[1] = 4; q[0] = 4; } else { int C; if (Qbits(2, 1) == 0x3) { q[2] = 4; C = (Qbits(4, 3) << 3) | ((0x3 & ~(Qbits(6, 5))) << 1) | Qbits[0]; } else { q[2] = Qbits(6, 5); C = Qbits(4, 0); } SkTBits<int> Cbits(C); if (Cbits(2, 0) == 0x5) { q[1] = 4; q[0] = Cbits(4, 3); } else { q[1] = Cbits(4, 3); q[0] = Cbits(2, 0); } } for (int i = 0; i < 3; ++i) { SkASSERT(q[i] < 5); SkASSERT(m[i] < (1 << nBits)); } for (int i = 0; i < 3; ++i) { *dst = (q[i] << nBits) + m[i]; ++dst; } } static bool decode_integer_sequence( int* dst, int dstSize, int nVals, const ASTCBlock &block, int startBit, int endBit, bool bReadForward, int nBits, int nTrits, int nQuints ) { if (nVals > dstSize) { return false; } ASTCBlock src = block; if (!bReadForward) { src.reverse(); startBit = 128 - startBit; endBit = 128 - endBit; } while (nVals > 0) { if (nTrits > 0) { SkASSERT(0 == nQuints); int endBlockBit = startBit + 8 + 5*nBits; if (endBlockBit > endBit) { endBlockBit = endBit; } int trits[5]; decode_trit_block(trits, nBits, read_astc_bits(src, startBit, endBlockBit)); memcpy(dst, trits, SkMin32(nVals, 5)*sizeof(int)); dst += 5; nVals -= 5; startBit = endBlockBit; } else if (nQuints > 0) { SkASSERT(0 == nTrits); int endBlockBit = startBit + 7 + 3*nBits; if (endBlockBit > endBit) { endBlockBit = endBit; } int quints[3]; decode_quint_block(quints, nBits, read_astc_bits(src, startBit, endBlockBit)); memcpy(dst, quints, SkMin32(nVals, 3)*sizeof(int)); dst += 3; nVals -= 3; startBit = endBlockBit; } else { int endValBit = startBit + nBits; if (endValBit > endBit) { endValBit = endBit; } SkASSERT(endValBit - startBit < 31); *dst = static_cast<int>(read_astc_bits(src, startBit, endValBit)); ++dst; --nVals; startBit = endValBit; } } return true; } static inline int unquantize_value(unsigned mask, int A, int B, int C, int D) { int T = D * C + B; T = T ^ A; T = (A & mask) | (T >> 2); SkASSERT(T < 256); return T; } static inline int replicate_bits(int x, int oldPrec, int prec) { while (oldPrec < prec) { const int toShift = SkMin32(prec-oldPrec, oldPrec); x = (x << toShift) | (x >> (oldPrec - toShift)); oldPrec += toShift; } SkASSERT((-(1 << prec) & x) == 0); return x; } static inline int unquantize_bits_color(int val, int nBits) { return replicate_bits(val, nBits, 8); } static inline int unquantize_trit_color(int val, int nBits) { SkASSERT(nBits > 0); SkASSERT(nBits < 7); const int D = (val >> nBits) & 0x3; SkASSERT(D < 3); const int A = -(val & 0x1) & 0x1FF; static const int Cvals[6] = { 204, 93, 44, 22, 11, 5 }; const int C = Cvals[nBits - 1]; int B = 0; const SkTBits<int> valBits(val); switch (nBits) { case 1: B = 0; break; case 2: { const int b = valBits[1]; B = (b << 1) | (b << 2) | (b << 4) | (b << 8); } break; case 3: { const int cb = valBits(2, 1); B = cb | (cb << 2) | (cb << 7); } break; case 4: { const int dcb = valBits(3, 1); B = dcb | (dcb << 6); } break; case 5: { const int edcb = valBits(4, 1); B = (edcb << 5) | (edcb >> 2); } break; case 6: { const int fedcb = valBits(5, 1); B = (fedcb << 4) | (fedcb >> 4); } break; } return unquantize_value(0x80, A, B, C, D); } static inline int unquantize_quint_color(int val, int nBits) { const int D = (val >> nBits) & 0x7; SkASSERT(D < 5); const int A = -(val & 0x1) & 0x1FF; static const int Cvals[5] = { 113, 54, 26, 13, 6 }; SkASSERT(nBits > 0); SkASSERT(nBits < 6); const int C = Cvals[nBits - 1]; int B = 0; const SkTBits<int> valBits(val); switch (nBits) { case 1: B = 0; break; case 2: { const int b = valBits[1]; B = (b << 2) | (b << 3) | (b << 8); } break; case 3: { const int cb = valBits(2, 1); B = (cb >> 1) | (cb << 1) | (cb << 7); } break; case 4: { const int dcb = valBits(3, 1); B = (dcb >> 1) | (dcb << 6); } break; case 5: { const int edcb = valBits(4, 1); B = (edcb << 5) | (edcb >> 3); } break; } return unquantize_value(0x80, A, B, C, D); } static void unquantize_colors(int *vals, int nVals, int nBits, int nTrits, int nQuints) { for (int i = 0; i < nVals; ++i) { if (nTrits > 0) { SkASSERT(nQuints == 0); vals[i] = unquantize_trit_color(vals[i], nBits); } else if (nQuints > 0) { SkASSERT(nTrits == 0); vals[i] = unquantize_quint_color(vals[i], nBits); } else { SkASSERT(nQuints == 0 && nTrits == 0); vals[i] = unquantize_bits_color(vals[i], nBits); } } } static int interpolate_channel(int c0, int c1, int weight) { SkASSERT(0 <= c0 && c0 < 256); SkASSERT(0 <= c1 && c1 < 256); c0 = (c0 << 8) | c0; c1 = (c1 << 8) | c1; const int result = ((c0*(64 - weight) + c1*weight + 32) / 64) >> 8; if (result > 255) { return 255; } SkASSERT(result >= 0); return result; } static SkColor interpolate_endpoints(const SkColor endpoints[2], int weight) { return SkColorSetARGB( interpolate_channel(SkColorGetA(endpoints[0]), SkColorGetA(endpoints[1]), weight), interpolate_channel(SkColorGetR(endpoints[0]), SkColorGetR(endpoints[1]), weight), interpolate_channel(SkColorGetG(endpoints[0]), SkColorGetG(endpoints[1]), weight), interpolate_channel(SkColorGetB(endpoints[0]), SkColorGetB(endpoints[1]), weight)); } static SkColor interpolate_dual_endpoints( const SkColor endpoints[2], int weight0, int weight1, int plane) { int a = interpolate_channel(SkColorGetA(endpoints[0]), SkColorGetA(endpoints[1]), weight0); int r = interpolate_channel(SkColorGetR(endpoints[0]), SkColorGetR(endpoints[1]), weight0); int g = interpolate_channel(SkColorGetG(endpoints[0]), SkColorGetG(endpoints[1]), weight0); int b = interpolate_channel(SkColorGetB(endpoints[0]), SkColorGetB(endpoints[1]), weight0); switch (plane) { case 0: r = interpolate_channel( SkColorGetR(endpoints[0]), SkColorGetR(endpoints[1]), weight1); break; case 1: g = interpolate_channel( SkColorGetG(endpoints[0]), SkColorGetG(endpoints[1]), weight1); break; case 2: b = interpolate_channel( SkColorGetB(endpoints[0]), SkColorGetB(endpoints[1]), weight1); break; case 3: a = interpolate_channel( SkColorGetA(endpoints[0]), SkColorGetA(endpoints[1]), weight1); break; default: SkDEBUGFAIL(�); break; } return SkColorSetARGB(a, r, g, b); } struct ASTCDecompressionData { ASTCDecompressionData(int dimX, int dimY) : fDimX(dimX), fDimY(dimY) { } const int fDimX; const int fDimY; ASTCBlock fBlock; int fBlockMode; bool fDualPlaneEnabled; int fDualPlane; bool fVoidExtent; bool fError; int fWeightDimX; int fWeightDimY; int fWeightBits; int fWeightTrits; int fWeightQuints; int fPartCount; int fPartIndex; enum ColorEndpointMode { kLDR_Luminance_Direct_ColorEndpointMode = 0, kLDR_Luminance_BaseOffset_ColorEndpointMode = 1, kHDR_Luminance_LargeRange_ColorEndpointMode = 2, kHDR_Luminance_SmallRange_ColorEndpointMode = 3, kLDR_LuminanceAlpha_Direct_ColorEndpointMode = 4, kLDR_LuminanceAlpha_BaseOffset_ColorEndpointMode = 5, kLDR_RGB_BaseScale_ColorEndpointMode = 6, kHDR_RGB_BaseScale_ColorEndpointMode = 7, kLDR_RGB_Direct_ColorEndpointMode = 8, kLDR_RGB_BaseOffset_ColorEndpointMode = 9, kLDR_RGB_BaseScaleWithAlpha_ColorEndpointMode = 10, kHDR_RGB_ColorEndpointMode = 11, kLDR_RGBA_Direct_ColorEndpointMode = 12, kLDR_RGBA_BaseOffset_ColorEndpointMode = 13, kHDR_RGB_LDRAlpha_ColorEndpointMode = 14, kHDR_RGB_HDRAlpha_ColorEndpointMode = 15 }; static const int kMaxColorEndpointModes = 16; static const int kMaxPartitions = 4; ColorEndpointMode fCEM[kMaxPartitions]; int fColorStartBit; int fColorEndBit; int numPartitions() const { return fPartCount; } int numWeights() const { return fWeightDimX * fWeightDimY * (fDualPlaneEnabled ? 2 : 1); } int maxWeightValue() const { int maxVal = (1 << fWeightBits); if (fWeightTrits > 0) { SkASSERT(0 == fWeightQuints); maxVal *= 3; } else if (fWeightQuints > 0) { SkASSERT(0 == fWeightTrits); maxVal *= 5; } return maxVal - 1; } int numWeightBits() const { const int nWeights = this->numWeights(); return ((nWeights*8*fWeightTrits + 4) / 5) + ((nWeights*7*fWeightQuints + 2) / 3) + (nWeights*fWeightBits); } int numColorValues() const { int numValues = 0; for (int i = 0; i < this->numPartitions(); ++i) { int cemInt = static_cast<int>(fCEM[i]); numValues += ((cemInt >> 2) + 1) * 2; } return numValues; } bool getColorValueEncoding(int *nBits, int *nTrits, int *nQuints) const { if (nullptr == nBits || nullptr == nTrits || nullptr == nQuints) { return false; } const int nColorVals = this->numColorValues(); if (nColorVals <= 0) { return false; } const int colorBits = fColorEndBit - fColorStartBit; SkASSERT(colorBits > 0); if (colorBits < ((13 * nColorVals + 4) / 5)) { return false; } for (int i = 255; i > 0; --i) { int range = i + 1; int bits = 0, trits = 0, quints = 0; bool valid = false; if (SkIsPow2(range)) { bits = bits_for_range(range); valid = true; } else if ((range % 3) == 0 && SkIsPow2(range/3)) { trits = 1; bits = bits_for_range(range/3); valid = true; } else if ((range % 5) == 0 && SkIsPow2(range/5)) { quints = 1; bits = bits_for_range(range/5); valid = true; } if (valid) { const int actualColorBits = ((nColorVals*8*trits + 4) / 5) + ((nColorVals*7*quints + 2) / 3) + (nColorVals*bits); if (actualColorBits <= colorBits) { *nTrits = trits; *nQuints = quints; *nBits = bits; return true; } } } return false; } void colorEndpoints(SkColor endpoints[4][2], const int* colorValues) const { for (int i = 0; i < this->numPartitions(); ++i) { switch (fCEM[i]) { case kLDR_Luminance_Direct_ColorEndpointMode: { const int* v = colorValues; endpoints[i][0] = SkColorSetARGB(0xFF, v[0], v[0], v[0]); endpoints[i][1] = SkColorSetARGB(0xFF, v[1], v[1], v[1]); colorValues += 2; } break; case kLDR_Luminance_BaseOffset_ColorEndpointMode: { const int* v = colorValues; const int L0 = (v[0] >> 2) | (v[1] & 0xC0); const int L1 = clamp_byte(L0 + (v[1] & 0x3F)); endpoints[i][0] = SkColorSetARGB(0xFF, L0, L0, L0); endpoints[i][1] = SkColorSetARGB(0xFF, L1, L1, L1); colorValues += 2; } break; case kLDR_LuminanceAlpha_Direct_ColorEndpointMode: { const int* v = colorValues; endpoints[i][0] = SkColorSetARGB(v[2], v[0], v[0], v[0]); endpoints[i][1] = SkColorSetARGB(v[3], v[1], v[1], v[1]); colorValues += 4; } break; case kLDR_LuminanceAlpha_BaseOffset_ColorEndpointMode: { int v0 = colorValues[0]; int v1 = colorValues[1]; int v2 = colorValues[2]; int v3 = colorValues[3]; bit_transfer_signed(&v1, &v0); bit_transfer_signed(&v3, &v2); endpoints[i][0] = SkColorSetARGB(v2, v0, v0, v0); endpoints[i][1] = SkColorSetARGB( clamp_byte(v3+v2), clamp_byte(v1+v0), clamp_byte(v1+v0), clamp_byte(v1+v0)); colorValues += 4; } break; case kLDR_RGB_BaseScale_ColorEndpointMode: { decode_rgba_basescale(colorValues, endpoints[i], true); colorValues += 4; } break; case kLDR_RGB_Direct_ColorEndpointMode: { decode_rgba_direct(colorValues, endpoints[i], true); colorValues += 6; } break; case kLDR_RGB_BaseOffset_ColorEndpointMode: { decode_rgba_baseoffset(colorValues, endpoints[i], true); colorValues += 6; } break; case kLDR_RGB_BaseScaleWithAlpha_ColorEndpointMode: { decode_rgba_basescale(colorValues, endpoints[i], false); colorValues += 6; } break; case kLDR_RGBA_Direct_ColorEndpointMode: { decode_rgba_direct(colorValues, endpoints[i], false); colorValues += 8; } break; case kLDR_RGBA_BaseOffset_ColorEndpointMode: { decode_rgba_baseoffset(colorValues, endpoints[i], false); colorValues += 8; } break; default: SkDEBUGFAIL(�); break; } } } int unquantizeWeight(int x) const { SkASSERT(x <= this->maxWeightValue()); const int D = (x >> fWeightBits) & 0x7; const int A = -(x & 0x1) & 0x7F; SkTBits<int> xbits(x); int T = 0; if (fWeightTrits > 0) { SkASSERT(0 == fWeightQuints); switch (fWeightBits) { case 0: { SkASSERT(x < 3); static const int kUnquantizationTable[3] = { 0, 32, 63 }; T = kUnquantizationTable[x]; } break; case 1: { const int B = 0; const int C = 50; T = unquantize_value(0x20, A, B, C, D); } break; case 2: { const int b = xbits[1]; const int B = b | (b << 2) | (b << 6); const int C = 23; T = unquantize_value(0x20, A, B, C, D); } break; case 3: { const int cb = xbits(2, 1); const int B = cb | (cb << 5); const int C = 11; T = unquantize_value(0x20, A, B, C, D); } break; default: SkDEBUGFAIL(�); break; } } else if (fWeightQuints > 0) { SkASSERT(0 == fWeightTrits); switch (fWeightBits) { case 0: { SkASSERT(x < 5); static const int kUnquantizationTable[5] = { 0, 16, 32, 47, 63 }; T = kUnquantizationTable[x]; } break; case 1: { const int B = 0; const int C = 28; T = unquantize_value(0x20, A, B, C, D); } break; case 2: { const int b = xbits[1]; const int B = (b << 1) | (b << 6); const int C = 13; T = unquantize_value(0x20, A, B, C, D); } break; default: SkDEBUGFAIL(�); break; } } else { SkASSERT(0 == fWeightTrits); SkASSERT(0 == fWeightQuints); T = replicate_bits(x, fWeightBits, 6); } SkASSERT(T <= 63); if (T > 32) { T += 1; } SkASSERT(T <= 64); return T; } int getWeight(const int* unquantizedWeights, int idx, bool dualPlane) const { const int maxIdx = (fDualPlaneEnabled ? 2 : 1) * fWeightDimX * fWeightDimY - 1; if (fDualPlaneEnabled) { const int effectiveIdx = 2*idx + (dualPlane ? 1 : 0); if (effectiveIdx > maxIdx) { return 0; } return unquantizedWeights[effectiveIdx]; } SkASSERT(!dualPlane); if (idx > maxIdx) { return 0; } else { return unquantizedWeights[idx]; } } int infillWeight(const int* unquantizedValues, int s, int t, bool dualPlane) const { const int Ds = (1024 + fDimX/2) / (fDimX - 1); const int Dt = (1024 + fDimY/2) / (fDimY - 1); const int cs = Ds * s; const int ct = Dt * t; const int gs = (cs*(fWeightDimX - 1) + 32) >> 6; const int gt = (ct*(fWeightDimY - 1) + 32) >> 6; const int js = gs >> 4; const int jt = gt >> 4; const int fs = gs & 0xF; const int ft = gt & 0xF; const int idx = js + jt*fWeightDimX; const int p00 = this->getWeight(unquantizedValues, idx, dualPlane); const int p01 = this->getWeight(unquantizedValues, idx + 1, dualPlane); const int p10 = this->getWeight(unquantizedValues, idx + fWeightDimX, dualPlane); const int p11 = this->getWeight(unquantizedValues, idx + fWeightDimX + 1, dualPlane); const int w11 = (fs*ft + 8) >> 4; const int w10 = ft - w11; const int w01 = fs - w11; const int w00 = 16 - fs - ft + w11; const int weight = (p00*w00 + p01*w01 + p10*w10 + p11*w11 + 8) >> 4; SkASSERT(weight <= 64); return weight; } void texelWeights(int texelWeights[2][12][12], const int* texelValues) const { int unquantizedValues[144*2]; SkASSERT(this->numWeights() <= 144*2); for (int j = 0; j < this->numWeights(); ++j) { unquantizedValues[j] = this->unquantizeWeight(texelValues[j]); } for (int y = 0; y < fDimY; ++y) { for (int x = 0; x < fDimX; ++x) { texelWeights[0][x][y] = this->infillWeight(unquantizedValues, x, y, false); if (fDualPlaneEnabled) { texelWeights[1][x][y] = this->infillWeight(unquantizedValues, x, y, true); } } } } int getPartition(int x, int y) const { const int partitionCount = this->numPartitions(); int seed = fPartIndex; if ((fDimX * fDimY) < 31) { x <<= 1; y <<= 1; } seed += (partitionCount - 1) * 1024; uint32_t p = seed; p ^= p >> 15; p -= p << 17; p += p << 7; p += p << 4; p ^= p >> 5; p += p << 16; p ^= p >> 7; p ^= p >> 3; p ^= p << 6; p ^= p >> 17; uint32_t rnum = p; uint8_t seed1 = rnum & 0xF; uint8_t seed2 = (rnum >> 4) & 0xF; uint8_t seed3 = (rnum >> 8) & 0xF; uint8_t seed4 = (rnum >> 12) & 0xF; uint8_t seed5 = (rnum >> 16) & 0xF; uint8_t seed6 = (rnum >> 20) & 0xF; uint8_t seed7 = (rnum >> 24) & 0xF; uint8_t seed8 = (rnum >> 28) & 0xF; uint8_t seed9 = (rnum >> 18) & 0xF; uint8_t seed10 = (rnum >> 22) & 0xF; uint8_t seed11 = (rnum >> 26) & 0xF; uint8_t seed12 = ((rnum >> 30) | (rnum << 2)) & 0xF; seed1 *= seed1; seed2 *= seed2; seed3 *= seed3; seed4 *= seed4; seed5 *= seed5; seed6 *= seed6; seed7 *= seed7; seed8 *= seed8; seed9 *= seed9; seed10 *= seed10; seed11 *= seed11; seed12 *= seed12; int sh1, sh2, sh3; if (0 != (seed & 1)) { sh1 = (0 != (seed & 2))? 4 : 5; sh2 = (partitionCount == 3)? 6 : 5; } else { sh1 = (partitionCount==3)? 6 : 5; sh2 = (0 != (seed & 2))? 4 : 5; } sh3 = (0 != (seed & 0x10))? sh1 : sh2; seed1 >>= sh1; seed2 >>= sh2; seed3 >>= sh1; seed4 >>= sh2; seed5 >>= sh1; seed6 >>= sh2; seed7 >>= sh1; seed8 >>= sh2; seed9 >>= sh3; seed10 >>= sh3; seed11 >>= sh3; seed12 >>= sh3; const int z = 0; int a = seed1*x + seed2*y + seed11*z + (rnum >> 14); int b = seed3*x + seed4*y + seed12*z + (rnum >> 10); int c = seed5*x + seed6*y + seed9 *z + (rnum >> 6); int d = seed7*x + seed8*y + seed10*z + (rnum >> 2); a &= 0x3F; b &= 0x3F; c &= 0x3F; d &= 0x3F; if (partitionCount < 4) { d = 0; } if (partitionCount < 3) { c = 0; } if (a >= b && a >= c && a >= d) argument
|
/external/skia/src/gpu/ |
H A D | GrSWMaskHelper.cpp | 188 int dimX, dimY; local 189 SkTextureCompressor::GetBlockDimensions(fCompressedFormat, &dimX, &dimY); 190 cmpWidth = dimX * ((cmpWidth + (dimX - 1)) / dimX); 240 int dimX, dimY; local 241 SkTextureCompressor::GetBlockDimensions(fCompressedFormat, &dimX, &dimY); 242 SkASSERT((desc.fWidth % dimX) == 0);
|
/external/skia/tests/ |
H A D | PathOpsSkpClipTest.cpp | 483 int dimX = SkScalarCeilToInt(width / fScale); local 485 if (oldBitmap.tryAllocN32Pixels(dimX, dimY) && opBitmap.tryAllocN32Pixels(dimX, dimY)) {
|
/external/libgdx/backends/gdx-backend-android/libs/ |
H A D | android-4.4.jar | META-INF/ META-INF/MANIFEST.MF com/ com/android/ com/android/internal/ com/android/internal/util/ ... |
/external/robolectric/v1/lib/main/ |
H A D | android.jar | META-INF/ META-INF/MANIFEST.MF com/ com/android/ com/android/internal/ com/android/internal/util/ ... |
/external/robolectric/v3/runtime/ |
H A D | android-all-4.1.2_r1-robolectric-0.jar | META-INF/ META-INF/MANIFEST.MF android/ android/accessibilityservice/ android/accessibilityservice/AccessibilityService$1.class ... |
H A D | android-all-4.2.2_r1.2-robolectric-0.jar | META-INF/ META-INF/MANIFEST.MF android/ android/accessibilityservice/ android/accessibilityservice/AccessibilityService$1.class ... |
H A D | android-all-5.0.0_r2-robolectric-1.jar | META-INF/ META-INF/MANIFEST.MF com/ com/google/ com/google/android/ com/google/android/collect/ ... |
H A D | android-all-5.1.1_r9-robolectric-1.jar | META-INF/ META-INF/MANIFEST.MF com/ com/google/ com/google/android/ com/google/android/collect/ ... |
H A D | android-all-4.3_r2-robolectric-0.jar | META-INF/ META-INF/MANIFEST.MF android/ android/accessibilityservice/ android/accessibilityservice/AccessibilityService$1.class ... |
H A D | android-all-4.4_r1-robolectric-1.jar | META-INF/ META-INF/MANIFEST.MF com/ com/google/ com/google/android/ com/google/android/collect/ ... |