Home
last modified time | relevance | path

Searched refs:weight (Results 1 – 25 of 106) sorted by relevance

12345

/frameworks/base/libs/hwui/hwui/
DTypeface.cpp39 static Typeface::Style computeAPIStyle(int weight, bool italic) { in computeAPIStyle() argument
41 if (weight >= SkFontStyle::kSemiBold_Weight) { in computeAPIStyle()
48 static minikin::FontStyle computeMinikinStyle(int weight, bool italic) { in computeMinikinStyle() argument
49 return minikin::FontStyle(uirenderer::MathUtils::clamp(weight, 1, 1000), in computeMinikinStyle()
55 int weight = baseWeight; in computeRelativeStyle() local
57 weight += 300; in computeRelativeStyle()
60 return computeMinikinStyle(weight, italic); in computeRelativeStyle()
82 Typeface* Typeface::createAbsolute(Typeface* base, int weight, bool italic) { in createAbsolute() argument
88 result->fAPIStyle = computeAPIStyle(weight, italic); in createAbsolute()
89 result->fStyle = computeMinikinStyle(weight, italic); in createAbsolute()
[all …]
/frameworks/minikin/include/minikin/
DFontStyle.h44 constexpr explicit FontStyle(Weight weight) : FontStyle(weight, Slant::UPRIGHT) {} in FontStyle() argument
46 constexpr FontStyle(Weight weight, Slant slant) in FontStyle() argument
47 : FontStyle(static_cast<uint16_t>(weight), slant) {} in FontStyle()
48 constexpr FontStyle(uint16_t weight, Slant slant) : mWeight(weight), mSlant(slant) {} in FontStyle() argument
50 constexpr uint16_t weight() const { return mWeight; } in weight() function
54 return weight() == other.weight() && slant() == other.slant();
58 return (static_cast<uint32_t>(weight()) << 16) | static_cast<uint32_t>(slant()); in identifier()
/frameworks/ml/nn/common/operations/
DLSHProjection.cpp73 RunTimeOperandInfo* weight = GetInput(operation, operands, kWeightTensor); in Prepare() local
75 NN_CHECK_EQ(NumDimensions(weight), 1); in Prepare()
76 NN_CHECK_EQ(SizeOfDimension(weight, 0), SizeOfDimension(input, 0)); in Prepare()
97 int runningSignBit(const RunTimeOperandInfo* input, const RunTimeOperandInfo* weight, float seed) { in runningSignBit() argument
115 if (weight->lifetime == OperandLifeTime::NO_VALUE) { in runningSignBit()
118 score += static_cast<double>(reinterpret_cast<T*>(weight->buffer)[i]) * running_value; in runningSignBit()
127 const RunTimeOperandInfo* input, const RunTimeOperandInfo* weight, in SparseLshProjection() argument
135 int bit = runningSignBit<T>(input, weight, static_cast<float>(seed)); in SparseLshProjection()
148 const RunTimeOperandInfo* weight, int32_t* out_buf) { in DenseLshProjection() argument
154 int bit = runningSignBit<T>(input, weight, static_cast<float>(seed)); in DenseLshProjection()
[all …]
/frameworks/base/libs/hwui/tests/unit/
DTypefaceTests.cpp86 EXPECT_EQ(700, bold->fStyle.weight()); in TEST()
91 EXPECT_EQ(300, light->fStyle.weight()); in TEST()
99 EXPECT_EQ(400, normal->fStyle.weight()); in TEST()
105 EXPECT_EQ(700, bold->fStyle.weight()); in TEST()
111 EXPECT_EQ(400, italic->fStyle.weight()); in TEST()
117 EXPECT_EQ(700, boldItalic->fStyle.weight()); in TEST()
128 EXPECT_EQ(700, normal->fStyle.weight()); in TEST()
135 EXPECT_EQ(1000, bold->fStyle.weight()); in TEST()
142 EXPECT_EQ(700, italic->fStyle.weight()); in TEST()
150 EXPECT_EQ(1000, boldItalic->fStyle.weight()); in TEST()
[all …]
/frameworks/base/graphics/java/android/graphics/fonts/
DFontFileUtil.java55 private static int pack(@IntRange(from = 0, to = 1000) int weight, boolean italic) { in pack()
56 return weight | (italic ? 0x10000 : 0); in pack()
71 int weight = -1; in analyzeStyle() local
76 weight = (int) axis.getStyleValue(); in analyzeStyle()
83 if (weight != -1 && italic != -1) { in analyzeStyle()
87 return pack(weight, italic == 1); in analyzeStyle()
128 return pack(weight == -1 ? weightFromOS2 : weight, in analyzeStyle()
/frameworks/base/core/java/android/widget/
DActivityChooserModel.java559 final float weight; in setDefaultActivity() local
562 weight = oldDefaultActivity.weight - newDefaultActivity.weight in setDefaultActivity()
565 weight = DEFAULT_HISTORICAL_RECORD_WEIGHT; in setDefaultActivity()
572 System.currentTimeMillis(), weight); in setDefaultActivity()
805 public final float weight; field in ActivityChooserModel.HistoricalRecord
814 public HistoricalRecord(String activityName, long time, float weight) { in HistoricalRecord() argument
815 this(ComponentName.unflattenFromString(activityName), time, weight); in HistoricalRecord()
825 public HistoricalRecord(ComponentName activityName, long time, float weight) { in HistoricalRecord() argument
828 this.weight = weight; in HistoricalRecord()
837 result = prime * result + Float.floatToIntBits(weight); in hashCode()
[all …]
/frameworks/layoutlib/bridge/src/android/graphics/
DTypeface_Delegate.java93 int weight) { in Typeface_Delegate() argument
97 mWeight = weight; in Typeface_Delegate()
122 /*package*/ static long nativeCreateFromTypefaceWithExactStyle(long native_instance, int weight, in nativeCreateFromTypefaceWithExactStyle() argument
132 int style = weight >= 600 ? (italic ? Typeface.BOLD_ITALIC : Typeface.BOLD) : in nativeCreateFromTypefaceWithExactStyle()
136 weight)); in nativeCreateFromTypefaceWithExactStyle()
158 /*package*/ static long nativeCreateWeightAlias(long native_instance, int weight) { in nativeCreateWeightAlias() argument
169 weight); in nativeCreateWeightAlias()
174 /*package*/ static synchronized long nativeCreateFromArray(long[] familyArray, int weight, in nativeCreateFromArray() argument
185 if (weight == Typeface.RESOLVE_BY_FONT_TABLE) { in nativeCreateFromArray()
186 weight = 400; in nativeCreateFromArray()
[all …]
DFontFamily_Delegate.java292 FontVariationAxis[] axes, int weight, int italic) { in addFont() argument
298 return delegate != null && delegate.addFont(path, ttcIndex, weight, italic); in addFont()
336 int weight, int isItalic) {
343 int ttcIndex, int weight, int isItalic) {
353 static boolean addFont(long builderPtr, final String path, final int weight,
359 delegate.mPostInitRunnables.add(() -> delegate.addFont(path, weight, italic));
362 return delegate.addFont(path, weight, italic);
383 private boolean addFont(final String path, int ttcIndex, int weight, int italic) {
386 mPostInitRunnables.add(() -> addFont(path, weight, italic));
389 return addFont(path, weight, italic);
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/
DHistoryEvaluator.java62 sumValue += data.evaluation * data.weight; in weightedAverage()
63 sumWeight += data.weight; in weightedAverage()
91 list.get(i).weight *= factor; in decayValue()
95 while (!list.isEmpty() && isZero(list.get(0).weight)) { in decayValue()
110 public float weight; field in HistoryEvaluator.Data
114 weight = 1.0f; in Data()
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/view/
DButtonBarLayout.java87 child.setTag(R.id.suw_original_weight, childParams.weight); in setStacked()
88 childParams.weight = 0; in setStacked()
90 Float weight = (Float) child.getTag(R.id.suw_original_weight); in setStacked() local
91 if (weight != null) { in setStacked()
92 childParams.weight = weight; in setStacked()
/frameworks/base/core/tests/coretests/src/android/graphics/
DFontFileUtilTest.java104 int weight = style.first.intValue(); in testRegularFonts() local
106 String path = FontTestUtil.getFontPathFromStyle(weight, italic); in testRegularFonts()
110 assertEquals(path, weight, FontFileUtil.unpackWeight(packed)); in testRegularFonts()
121 int weight = style.first.intValue(); in testTtcFont() local
123 int ttcIndex = FontTestUtil.getTtcIndexFromStyle(weight, italic); in testTtcFont()
126 assertEquals(path + "#" + ttcIndex, weight, FontFileUtil.unpackWeight(packed)); in testTtcFont()
137 int weight = style.first.intValue(); in testVariationFont() local
139 String axes = FontTestUtil.getVarSettingsFromStyle(weight, italic); in testVariationFont()
143 assertEquals(path + "#" + axes, weight, FontFileUtil.unpackWeight(packed)); in testVariationFont()
DFontTestUtil.java184 public static int getTtcIndexFromStyle(int weight, boolean italic) { in getTtcIndexFromStyle() argument
185 return sTtcMap.get(new Pair<>(weight, italic)).intValue(); in getTtcIndexFromStyle()
191 public static String getVarSettingsFromStyle(int weight, boolean italic) { in getVarSettingsFromStyle() argument
192 return sVariationSettingsMap.get(new Pair<>(weight, italic)); in getVarSettingsFromStyle()
198 public static String getFontPathFromStyle(int weight, boolean italic) { in getFontPathFromStyle() argument
199 return sFontMap.get(new Pair<>(weight, italic)); in getFontPathFromStyle()
/frameworks/base/graphics/java/android/graphics/
DFontFamily.java139 public boolean addFont(String path, int ttcIndex, FontVariationAxis[] axes, int weight, in addFont() argument
153 return nAddFont(mBuilderPtr, fontBuffer, ttcIndex, weight, italic); in addFont()
165 int weight, int italic) { in addFontFromBuffer() argument
174 return nAddFontWeightStyle(mBuilderPtr, font, ttcIndex, weight, italic); in addFontFromBuffer()
194 boolean isAsset, int ttcIndex, int weight, int isItalic, in addFontFromAssetManager() argument
202 return addFontFromBuffer(buffer, ttcIndex, axes, weight, isItalic); in addFontFromAssetManager()
221 int weight, int isItalic); in nAddFont() argument
223 int ttcIndex, int weight, int isItalic); in nAddFontWeightStyle() argument
DTypeface.java450 public Builder setWeight(@IntRange(from = 1, to = 1000) int weight) { in setWeight()
451 mWeight = weight; in setWeight()
452 mFontBuilder.setWeight(weight); in setWeight()
540 @Nullable FontVariationAxis[] axes, int weight, int italic, String fallback) { in createAssetUid() argument
552 builder.append(Integer.toString(weight)); in createAssetUid()
580 final int weight = (mWeight == RESOLVE_BY_FONT_TABLE) ? base.mWeight : mWeight; in resolveFallbackTypeface() local
583 return createWeightStyle(base, weight, italic); in resolveFallbackTypeface()
611 final int weight = mWeight == RESOLVE_BY_FONT_TABLE in build() local
616 .setStyle(new FontStyle(weight, slant)); in build()
791 final int weight = mStyle == null ? 400 : mStyle.getWeight();
[all …]
/frameworks/base/core/java/android/gesture/
DInstanceLearner.java60 double weight; in classify() local
62 weight = Double.MAX_VALUE; in classify()
64 weight = 1 / distance; in classify()
67 if (score == null || weight > score) { in classify()
68 label2score.put(sample.label, weight); in classify()
/frameworks/base/core/java/com/android/internal/graphics/palette/
DTarget.java260 float weight = mWeights[i]; in normalizeWeights() local
261 if (weight > 0) { in normalizeWeights()
262 sum += weight; in normalizeWeights()
379 public Target.Builder setSaturationWeight(@FloatRange(from = 0) float weight) { in setSaturationWeight()
380 mTarget.mWeights[INDEX_WEIGHT_SAT] = weight; in setSaturationWeight()
395 public Target.Builder setLightnessWeight(@FloatRange(from = 0) float weight) { in setLightnessWeight()
396 mTarget.mWeights[INDEX_WEIGHT_LUMA] = weight; in setLightnessWeight()
410 public Target.Builder setPopulationWeight(@FloatRange(from = 0) float weight) { in setPopulationWeight()
411 mTarget.mWeights[INDEX_WEIGHT_POP] = weight; in setPopulationWeight()
/frameworks/base/libs/hwui/jni/
DTypeface.cpp51 jint weight, jboolean italic) { in Typeface_createFromTypefaceWithExactStyle() argument
52 return toJLong(Typeface::createAbsolute(toTypeface(nativeInstance), weight, italic)); in Typeface_createFromTypefaceWithExactStyle()
70 static jlong Typeface_createWeightAlias(JNIEnv* env, jobject, jlong familyHandle, jint weight) { in Typeface_createWeightAlias() argument
71 return toJLong(Typeface::createWithDifferentBaseWeight(toTypeface(familyHandle), weight)); in Typeface_createWeightAlias()
90 return toTypeface(faceHandle)->fStyle.weight(); in Typeface_getWeight()
94 int weight, int italic) { in Typeface_createFromArray() argument
102 return toJLong(Typeface::createFromFamilies(std::move(familyVec), weight, italic)); in Typeface_createFromArray()
/frameworks/minikin/libs/minikin/
DFontFamily.cpp49 mWeight = styleFromFont.weight(); in build()
88 int weight; in analyzeStyle() local
90 if (!::minikin::analyzeStyle(os2Table.get(), os2Table.size(), &weight, &italic)) { in analyzeStyle()
94 return FontStyle(static_cast<uint16_t>(weight), static_cast<FontStyle::Slant>(italic)); in analyzeStyle()
129 int score = abs(style1.weight() / 100 - style2.weight() / 100); in computeMatch()
140 bool isFakeBold = wanted.weight() >= 600 && (wanted.weight() - actual.weight()) >= 200; in computeFakery()
/frameworks/ml/nn/runtime/test/specs/V1_0/
Dlsh_projection_2.mod.py26 weight = Input("weight", "TENSOR_FLOAT32", "{%d}" % (num_input)) variable
29 model = model.Operation("LSH_PROJECTION", hhash, lookup, weight,
36 weight: [],
Dlsh_projection.mod.py26 weight = Input("weight", "TENSOR_FLOAT32", "{%d}" % (num_input)) variable
29 model = model.Operation("LSH_PROJECTION", hhash, lookup, weight,
35 weight: [0.12, 0.34, 0.56]
Dlsh_projection_weights_as_inputs.mod.py25 weight = Input("weight", "TENSOR_FLOAT32", "{%d}" % (num_input)) variable
28 model = model.Operation("LSH_PROJECTION", hhash, lookup, weight, type_param).To(output)
32 weight: [0.12, 0.34, 0.56],
/frameworks/ml/nn/runtime/test/specs/V1_2/
Dlsh_projection_float16.mod.py26 weight = Input("weight", "TENSOR_FLOAT16", "{%d}" % (num_input)) variable
29 model = model.Operation("LSH_PROJECTION", hhash, lookup, weight,
35 weight: [0.12, 0.34, 0.56]
Dlsh_projection_deprecated.mod.py27 weight = Input("weight", "TENSOR_FLOAT32", "{%d}" % (num_input)) variable
30 model = model.Operation("LSH_PROJECTION", hhash, lookup, weight,
38 weight: [],
Dlsh_projection_3_relaxed.mod.py27 weight = Input("weight", "TENSOR_FLOAT32", "{%d}" % (num_input)) variable
30 model = model.Operation("LSH_PROJECTION", hhash, lookup, weight,
38 weight: [],
/frameworks/ml/nn/runtime/test/specs/V1_1/
Dlsh_projection_2_relaxed.mod.py27 weight = Input("weight", "TENSOR_FLOAT32", "{%d}" % (num_input)) variable
30 model = model.Operation("LSH_PROJECTION", hhash, lookup, weight,
38 weight: [],

12345