Home
last modified time | relevance | path

Searched refs:targetDensity (Results 1 – 16 of 16) sorted by relevance

/frameworks/base/graphics/java/android/graphics/drawable/
DInsetDrawable.java276 void onDensityChanged(int sourceDensity, int targetDensity) { in onDensityChanged() argument
277 super.onDensityChanged(sourceDensity, targetDensity); in onDensityChanged()
279 applyDensityScaling(sourceDensity, targetDensity); in onDensityChanged()
289 private void applyDensityScaling(int sourceDensity, int targetDensity) { in applyDensityScaling() argument
290 mInsetLeft = Bitmap.scaleFromDensity(mInsetLeft, sourceDensity, targetDensity); in applyDensityScaling()
291 mInsetTop = Bitmap.scaleFromDensity(mInsetTop, sourceDensity, targetDensity); in applyDensityScaling()
292 mInsetRight = Bitmap.scaleFromDensity(mInsetRight, sourceDensity, targetDensity); in applyDensityScaling()
293 mInsetBottom = Bitmap.scaleFromDensity(mInsetBottom, sourceDensity, targetDensity); in applyDensityScaling()
DNinePatchDrawable.java668 final int targetDensity = mTargetDensity; in computeBitmapSize() local
673 sourceOpticalInsets.left, sourceDensity, targetDensity, true); in computeBitmapSize()
675 sourceOpticalInsets.top, sourceDensity, targetDensity, true); in computeBitmapSize()
677 sourceOpticalInsets.right, sourceDensity, targetDensity, true); in computeBitmapSize()
679 sourceOpticalInsets.bottom, sourceDensity, targetDensity, true); in computeBitmapSize()
691 sourcePadding.left, sourceDensity, targetDensity, false); in computeBitmapSize()
693 sourcePadding.top, sourceDensity, targetDensity, false); in computeBitmapSize()
695 sourcePadding.right, sourceDensity, targetDensity, false); in computeBitmapSize()
697 sourcePadding.bottom, sourceDensity, targetDensity, false); in computeBitmapSize()
703 ninePatch.getHeight(), sourceDensity, targetDensity, true); in computeBitmapSize()
[all …]
DLayerDrawable.java1878 public final void setDensity(int targetDensity) {
1879 if (mDensity != targetDensity) {
1881 mDensity = targetDensity;
1883 applyDensityScaling(sourceDensity, targetDensity);
1887 private void applyDensityScaling(int sourceDensity, int targetDensity) {
1888 mInsetL = Drawable.scaleFromDensity(mInsetL, sourceDensity, targetDensity, false);
1889 mInsetT = Drawable.scaleFromDensity(mInsetT, sourceDensity, targetDensity, false);
1890 mInsetR = Drawable.scaleFromDensity(mInsetR, sourceDensity, targetDensity, false);
1891 mInsetB = Drawable.scaleFromDensity(mInsetB, sourceDensity, targetDensity, false);
1893 mInsetS = Drawable.scaleFromDensity(mInsetS, sourceDensity, targetDensity, false);
[all …]
DGradientDrawable.java1885 public final void setDensity(int targetDensity) {
1886 if (mDensity != targetDensity) {
1888 mDensity = targetDensity;
1890 applyDensityScaling(sourceDensity, targetDensity);
1894 private void applyDensityScaling(int sourceDensity, int targetDensity) {
1897 mInnerRadius, sourceDensity, targetDensity, true);
1901 mThickness, sourceDensity, targetDensity, true);
1905 mOpticalInsets.left, sourceDensity, targetDensity, true);
1907 mOpticalInsets.top, sourceDensity, targetDensity, true);
1909 mOpticalInsets.right, sourceDensity, targetDensity, true);
[all …]
DDrawableWrapper.java134 final int targetDensity = densityDpi == 0 ? DisplayMetrics.DENSITY_DEFAULT : densityDpi; in inflate() local
135 state.setDensity(targetDensity); in inflate()
481 public final void setDensity(int targetDensity) { in setDensity() argument
482 if (mDensity != targetDensity) { in setDensity()
484 mDensity = targetDensity; in setDensity()
486 onDensityChanged(sourceDensity, targetDensity); in setDensity()
499 void onDensityChanged(int sourceDensity, int targetDensity) { in onDensityChanged() argument
DVectorDrawable.java477 final int targetDensity = mTargetDensity; in computeVectorSize() local
478 if (targetDensity != sourceDensity) { in computeVectorSize()
480 (int) mVectorState.mBaseWidth, sourceDensity, targetDensity, true); in computeVectorSize()
482 (int) mVectorState.mBaseHeight,sourceDensity, targetDensity, true); in computeVectorSize()
484 opticalInsets.left, sourceDensity, targetDensity, false); in computeVectorSize()
486 opticalInsets.right, sourceDensity, targetDensity, false); in computeVectorSize()
488 opticalInsets.top, sourceDensity, targetDensity, false); in computeVectorSize()
490 opticalInsets.bottom, sourceDensity, targetDensity, false); in computeVectorSize()
984 public final boolean setDensity(int targetDensity) { in setDensity() argument
985 if (mDensity != targetDensity) { in setDensity()
[all …]
DDrawable.java1447 static float scaleFromDensity(float pixels, int sourceDensity, int targetDensity) { in scaleFromDensity() argument
1448 return pixels * targetDensity / sourceDensity; in scaleFromDensity()
1470 int pixels, int sourceDensity, int targetDensity, boolean isSize) { in scaleFromDensity() argument
1471 if (pixels == 0 || sourceDensity == targetDensity) { in scaleFromDensity()
1475 final float result = pixels * targetDensity / (float) sourceDensity; in scaleFromDensity()
DRippleDrawable.java1006 protected void onDensityChanged(int sourceDensity, int targetDensity) { in onDensityChanged() argument
1007 super.onDensityChanged(sourceDensity, targetDensity); in onDensityChanged()
1009 applyDensityScaling(sourceDensity, targetDensity); in onDensityChanged()
1012 private void applyDensityScaling(int sourceDensity, int targetDensity) { in applyDensityScaling() argument
1015 mMaxRadius, sourceDensity, targetDensity, true); in applyDensityScaling()
DBitmapDrawable.java559 final int targetDensity = mTargetDensity; in updateShaderMatrix() local
560 final boolean needScaling = sourceDensity != 0 && sourceDensity != targetDensity; in updateShaderMatrix()
572 final float densityScale = targetDensity / (float) sourceDensity; in updateShaderMatrix()
DDrawableContainer.java934 final int targetDensity = Drawable.resolveDensity(res, mDensity); in updateDensity() local
936 mDensity = targetDensity; in updateDensity()
938 if (sourceDensity != targetDensity) { in updateDensity()
/frameworks/base/tools/aapt2/split/
DTableSplitter.cpp83 ConfigDescription targetDensity = config; in selectValues() local
84 targetDensity.density = densityValueIter->second; in selectValues()
89 thisValue->config.isBetterThan(bestValue->config, &targetDensity)) { in selectValues()
120 ConfigDescription targetDensity = config; in markNonPreferredDensitiesAsClaimed() local
121 targetDensity.density = preferredDensity; in markNonPreferredDensitiesAsClaimed()
126 } else if (thisValue->config.isBetterThan(bestValue->config, &targetDensity)) { in markNonPreferredDensitiesAsClaimed()
/frameworks/base/tools/layoutlib/bridge/src/android/graphics/
DBitmapFactory_Delegate.java138 final int targetDensity = opts.inTargetDensity; in setDensityFromOptions() local
139 if (targetDensity == 0 || density == targetDensity || density == opts.inScreenDensity) { in setDensityFromOptions()
149 outputBitmap.setDensity(targetDensity); in setDensityFromOptions()
/frameworks/base/graphics/java/android/graphics/
DBitmapFactory.java568 final int targetDensity = opts.inTargetDensity; in setDensityFromOptions() local
569 if (targetDensity == 0 || density == targetDensity || density == opts.inScreenDensity) { in setDensityFromOptions()
576 outputBitmap.setDensity(targetDensity); in setDensityFromOptions()
DBitmap.java1203 public int getScaledWidth(int targetDensity) { in getScaledWidth() argument
1204 return scaleFromDensity(getWidth(), mDensity, targetDensity); in getScaledWidth()
1214 public int getScaledHeight(int targetDensity) { in getScaledHeight() argument
1215 return scaleFromDensity(getHeight(), mDensity, targetDensity); in getScaledHeight()
/frameworks/base/core/jni/android/graphics/
DBitmapFactory.cpp269 const int targetDensity = env->GetIntField(options, gOptions_targetDensityFieldID); in doDecode() local
271 if (density != 0 && targetDensity != 0 && density != screenDensity) { in doDecode()
272 scale = (float) targetDensity / density; in doDecode()
/frameworks/base/services/core/java/com/android/server/wm/
DWindowManagerService.java5876 final int targetDensity = forcedDensity != 0 ? forcedDensity in setCurrentUser() local
5878 setForcedDisplayDensityLocked(displayContent, targetDensity); in setCurrentUser()