Searched refs:targetDensity (Results 1 - 15 of 15) sorted by relevance

/frameworks/base/tools/layoutlib/bridge/src/android/graphics/
H A DBitmapFactory_Delegate.java138 final int targetDensity = opts.inTargetDensity;
139 if (targetDensity == 0 || density == targetDensity || density == opts.inScreenDensity) {
149 outputBitmap.setDensity(targetDensity);
/frameworks/base/graphics/java/android/graphics/drawable/
H A DInsetDrawable.java276 void onDensityChanged(int sourceDensity, int targetDensity) { argument
277 super.onDensityChanged(sourceDensity, targetDensity);
279 applyDensityScaling(sourceDensity, targetDensity);
287 * @param targetDensity the new constant state density
289 private void applyDensityScaling(int sourceDensity, int targetDensity) { argument
290 mInsetLeft = Bitmap.scaleFromDensity(mInsetLeft, sourceDensity, targetDensity);
291 mInsetTop = Bitmap.scaleFromDensity(mInsetTop, sourceDensity, targetDensity);
292 mInsetRight = Bitmap.scaleFromDensity(mInsetRight, sourceDensity, targetDensity);
293 mInsetBottom = Bitmap.scaleFromDensity(mInsetBottom, sourceDensity, targetDensity);
H A DNinePatchDrawable.java668 final int targetDensity = mTargetDensity;
673 sourceOpticalInsets.left, sourceDensity, targetDensity, true);
675 sourceOpticalInsets.top, sourceDensity, targetDensity, true);
677 sourceOpticalInsets.right, sourceDensity, targetDensity, true);
679 sourceOpticalInsets.bottom, sourceDensity, targetDensity, true);
691 sourcePadding.left, sourceDensity, targetDensity, false);
693 sourcePadding.top, sourceDensity, targetDensity, false);
695 sourcePadding.right, sourceDensity, targetDensity, false);
697 sourcePadding.bottom, sourceDensity, targetDensity, false);
703 ninePatch.getHeight(), sourceDensity, targetDensity, tru
[all...]
H A DDrawableWrapper.java134 final int targetDensity = densityDpi == 0 ? DisplayMetrics.DENSITY_DEFAULT : densityDpi;
135 state.setDensity(targetDensity);
479 * @param targetDensity the new constant state density
481 public final void setDensity(int targetDensity) { argument
482 if (mDensity != targetDensity) {
484 mDensity = targetDensity;
486 onDensityChanged(sourceDensity, targetDensity);
497 * @param targetDensity the new constant state density
499 void onDensityChanged(int sourceDensity, int targetDensity) { argument
H A DGradientDrawable.java1855 * @param targetDensity the new constant state density
1857 public final void setDensity(int targetDensity) { argument
1858 if (mDensity != targetDensity) {
1860 mDensity = targetDensity;
1862 applyDensityScaling(sourceDensity, targetDensity);
1866 private void applyDensityScaling(int sourceDensity, int targetDensity) { argument
1869 mInnerRadius, sourceDensity, targetDensity, true);
1873 mThickness, sourceDensity, targetDensity, true);
1877 mOpticalInsets.left, sourceDensity, targetDensity, true);
1879 mOpticalInsets.top, sourceDensity, targetDensity, tru
[all...]
H A DLayerDrawable.java1866 public final void setDensity(int targetDensity) { argument
1867 if (mDensity != targetDensity) {
1869 mDensity = targetDensity;
1871 applyDensityScaling(sourceDensity, targetDensity);
1875 private void applyDensityScaling(int sourceDensity, int targetDensity) { argument
1876 mInsetL = Drawable.scaleFromDensity(mInsetL, sourceDensity, targetDensity, false);
1877 mInsetT = Drawable.scaleFromDensity(mInsetT, sourceDensity, targetDensity, false);
1878 mInsetR = Drawable.scaleFromDensity(mInsetR, sourceDensity, targetDensity, false);
1879 mInsetB = Drawable.scaleFromDensity(mInsetB, sourceDensity, targetDensity, false);
1881 mInsetS = Drawable.scaleFromDensity(mInsetS, sourceDensity, targetDensity, fals
1968 setDensity(int targetDensity) argument
1977 onDensityChanged(int sourceDensity, int targetDensity) argument
1981 applyDensityScaling(int sourceDensity, int targetDensity) argument
[all...]
H A DVectorDrawable.java447 final int targetDensity = mTargetDensity;
448 if (targetDensity != sourceDensity) {
450 (int) mVectorState.mBaseWidth, sourceDensity, targetDensity, true);
452 (int) mVectorState.mBaseHeight,sourceDensity, targetDensity, true);
454 opticalInsets.left, sourceDensity, targetDensity, false);
456 opticalInsets.right, sourceDensity, targetDensity, false);
458 opticalInsets.top, sourceDensity, targetDensity, false);
460 opticalInsets.bottom, sourceDensity, targetDensity, false);
923 public final boolean setDensity(int targetDensity) { argument
924 if (mDensity != targetDensity) {
933 applyDensityScaling(int sourceDensity, int targetDensity) argument
[all...]
H A DDrawable.java1440 * @param targetDensity the target density
1443 static float scaleFromDensity(float pixels, int sourceDensity, int targetDensity) { argument
1444 return pixels * targetDensity / sourceDensity;
1460 * @param targetDensity the target density
1466 int pixels, int sourceDensity, int targetDensity, boolean isSize) {
1467 if (pixels == 0 || sourceDensity == targetDensity) {
1471 final float result = pixels * targetDensity / (float) sourceDensity;
1465 scaleFromDensity( int pixels, int sourceDensity, int targetDensity, boolean isSize) argument
H A DRippleDrawable.java1006 protected void onDensityChanged(int sourceDensity, int targetDensity) { argument
1007 super.onDensityChanged(sourceDensity, targetDensity);
1009 applyDensityScaling(sourceDensity, targetDensity);
1012 private void applyDensityScaling(int sourceDensity, int targetDensity) { argument
1015 mMaxRadius, sourceDensity, targetDensity, true);
H A DDrawableContainer.java930 final int targetDensity = Drawable.resolveDensity(res, mDensity);
932 mDensity = targetDensity;
934 if (sourceDensity != targetDensity) {
/frameworks/base/tools/aapt2/split/
H A DTableSplitter.cpp83 ConfigDescription targetDensity = config; local
84 targetDensity.density = densityValueIter->second;
89 thisValue->config.isBetterThan(bestValue->config, &targetDensity)) {
120 ConfigDescription targetDensity = config; local
121 targetDensity.density = preferredDensity;
126 } else if (thisValue->config.isBetterThan(bestValue->config, &targetDensity)) {
/frameworks/base/graphics/java/android/graphics/
H A DBitmapFactory.java568 final int targetDensity = opts.inTargetDensity;
569 if (targetDensity == 0 || density == targetDensity || density == opts.inScreenDensity) {
576 outputBitmap.setDensity(targetDensity);
H A DBitmap.java1200 * @param targetDensity The density of the target canvas of the bitmap.
1203 public int getScaledWidth(int targetDensity) { argument
1204 return scaleFromDensity(getWidth(), mDensity, targetDensity);
1211 * @param targetDensity The density of the target canvas of the bitmap.
1214 public int getScaledHeight(int targetDensity) { argument
1215 return scaleFromDensity(getHeight(), mDensity, targetDensity);
/frameworks/base/core/jni/android/graphics/
H A DBitmapFactory.cpp269 const int targetDensity = env->GetIntField(options, gOptions_targetDensityFieldID); local
271 if (density != 0 && targetDensity != 0 && density != screenDensity) {
272 scale = (float) targetDensity / density;
/frameworks/base/services/core/java/com/android/server/wm/
H A DWindowManagerService.java5695 final int targetDensity = forcedDensity != 0 ? forcedDensity
5697 setForcedDisplayDensityLocked(displayContent, targetDensity);

Completed in 186 milliseconds