Home
last modified time | relevance | path

Searched refs:ratio (Results 1 – 25 of 65) sorted by relevance

123

/frameworks/native/services/surfaceflinger/
DLayerStats.cpp131 int32_t ratio = location * 8 / range; in destinationLocation() local
132 if (ratio < 0) return "N/A"; in destinationLocation()
135 if (ratio > 6) return "3/4"; in destinationLocation()
137 return locationArray[ratio & ~1]; in destinationLocation()
139 if (ratio > 7) return "7/8"; in destinationLocation()
140 return locationArray[ratio]; in destinationLocation()
145 int32_t ratio = size * 8 / range; in destinationSize() local
146 if (ratio < 0) return "N/A"; in destinationSize()
149 if (ratio > 6) return "1"; in destinationSize()
151 return sizeArray[ratio | 1]; in destinationSize()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/
DEndPointRatioClassifier.java35 float ratio; in getFalseTouchEvaluation() local
37 ratio = 1.0f; in getFalseTouchEvaluation()
39 ratio = stroke.getEndPointLength() / stroke.getTotalLength(); in getFalseTouchEvaluation()
41 return EndPointRatioEvaluator.evaluate(ratio); in getFalseTouchEvaluation()
/frameworks/base/core/java/com/android/internal/graphics/
DColorUtils.java586 @FloatRange(from = 0.0, to = 1.0) float ratio) { in blendARGB()
587 final float inverseRatio = 1 - ratio; in blendARGB()
588 float a = Color.alpha(color1) * inverseRatio + Color.alpha(color2) * ratio; in blendARGB()
589 float r = Color.red(color1) * inverseRatio + Color.red(color2) * ratio; in blendARGB()
590 float g = Color.green(color1) * inverseRatio + Color.green(color2) * ratio; in blendARGB()
591 float b = Color.blue(color1) * inverseRatio + Color.blue(color2) * ratio; in blendARGB()
608 @FloatRange(from = 0.0, to = 1.0) float ratio, @NonNull float[] outResult) { in blendHSL()
612 final float inverseRatio = 1 - ratio; in blendHSL()
614 outResult[0] = circularInterpolate(hsl1[0], hsl2[0], ratio); in blendHSL()
615 outResult[1] = hsl1[1] * inverseRatio + hsl2[1] * ratio; in blendHSL()
[all …]
/frameworks/base/core/java/android/gesture/
DOrientedBoundingBox.java42 float ratio = w / h; in OrientedBoundingBox() local
43 if (ratio > 1) { in OrientedBoundingBox()
44 squareness = 1 / ratio; in OrientedBoundingBox()
46 squareness = ratio; in OrientedBoundingBox()
/frameworks/base/media/mca/filterfw/native/core/
Dgeometry.cpp72 bool Rect::ExpandToAspectRatio(float ratio) { in ExpandToAspectRatio() argument
73 if (width <= 0.0f || height <= 0.0f || ratio <= 0.0f) { in ExpandToAspectRatio()
78 if (current_ratio < ratio) { in ExpandToAspectRatio()
79 const float dx = width * (ratio / current_ratio - 1.0f); in ExpandToAspectRatio()
83 const float dy = height * (current_ratio / ratio - 1.0f); in ExpandToAspectRatio()
/frameworks/base/core/java/com/android/internal/widget/
DLocalImageResolver.java49 double ratio = (originalSize > MAX_SAFE_ICON_SIZE_PX) in resolveImage() local
54 bitmapOptions.inSampleSize = getPowerOfTwoForSampleRatio(ratio); in resolveImage()
71 private static int getPowerOfTwoForSampleRatio(double ratio) { in getPowerOfTwoForSampleRatio() argument
72 int k = Integer.highestOneBit((int) Math.floor(ratio)); in getPowerOfTwoForSampleRatio()
/frameworks/base/media/mca/filterpacks/native/base/
Dgeometry.cpp73 bool Rect::ExpandToAspectRatio(float ratio) { in ExpandToAspectRatio() argument
74 if (width <= 0.0f || height <= 0.0f || ratio <= 0.0f) { in ExpandToAspectRatio()
79 if (current_ratio < ratio) { in ExpandToAspectRatio()
80 const float dx = width * (ratio / current_ratio - 1.0f); in ExpandToAspectRatio()
84 const float dy = height * (current_ratio / ratio - 1.0f); in ExpandToAspectRatio()
/frameworks/av/media/libeffects/dynamicsproc/dsp/
DDPBase.h116 float ratio, float threshold, float kneeWidth, float noiseGateThreshold,
133 void setRatio(float ratio) { in setRatio() argument
134 mRatio = ratio; in setRatio()
211 float ratio, float threshold, float postGain);
233 void setRatio(float ratio) { in setRatio() argument
234 mRatio = ratio; in setRatio()
DDPBase.cpp91 float ratio, float threshold, float kneeWidth, float noiseGateThreshold, in init() argument
96 setRatio(ratio); in init()
166 float ratio, float threshold, float postGain) { in init() argument
171 setRatio(ratio); in init()
DDPFrequency.cpp319 pMbcBandParams->ratio = pMbcBand->getRatio(); in updateParameters()
357 cb.mLimiterParams.ratio = pLimiter->getRatio(); in updateParameters()
544 const float ratio = pMbcBandParams->ratio; in processFirstStages() local
552 newLevelDb = envDb + ((1 / ratio) - 1) * (envDb - thresholdDb); in processFirstStages()
556 newLevelDb = envDb + ((1 / ratio) - 1) * in processFirstStages()
612 const float ratio = cb.mLimiterParams.ratio; in processFirstStages() local
616 newFactorDb = ((1 / ratio) - 1) * (envDb - thresholdDb); in processFirstStages()
DDPFrequency.h61 float ratio; member
74 float ratio; member
/frameworks/base/core/java/com/android/internal/util/
DImageUtils.java156 float ratio = Math.min((float) maxWidth / (float) originalWidth, in buildScaledBitmap() local
158 ratio = Math.min(1.0f, ratio); in buildScaledBitmap()
159 int scaledWidth = (int) (ratio * originalWidth); in buildScaledBitmap()
160 int scaledHeight = (int) (ratio * originalHeight); in buildScaledBitmap()
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/presentation/
DCubeRenderer.java94 float ratio = (float) width / height; in onSurfaceChanged() local
97 gl.glFrustumf(-ratio, ratio, -1, 1, 1, 10); in onSurfaceChanged()
/frameworks/base/core/java/android/widget/
DRatingBar.java286 final float ratio = getProgressPerStar(); in updateSecondaryProgress() local
287 if (ratio > 0) { in updateSecondaryProgress()
288 final float progressInStars = progress / ratio; in updateSecondaryProgress()
289 final int secondaryProgress = (int) (Math.ceil(progressInStars) * ratio); in updateSecondaryProgress()
/frameworks/minikin/include/minikin/
DLayoutCache.h168 float ratio = (mRequestCount == 0) ? 0 : mCacheHitCount / (float)mRequestCount; in dumpStats() local
171 mCache.size(), kMaxEntries, mCacheHitCount, mRequestCount, ratio); in dumpStats()
176 mCache.size(), kMaxEntries, mCacheHitCount, mRequestCount, ratio); in dumpStats()
181 float ratio = (mRequestCount == 0) ? 0 : mCacheHitCount / (float)mRequestCount; in dumpStats() local
182 dprintf(fd, " Hit ratio: %d/%d (%f)\n", mCacheHitCount, mRequestCount, ratio); in dumpStats()
/frameworks/native/opengl/tests/gldual/src/com/android/gldual/
DTriangleRenderer.java100 float ratio = (float) w / h; in onSurfaceChanged() local
103 gl.glFrustumf(-ratio, ratio, -1, 1, 3, 7); in onSurfaceChanged()
/frameworks/rs/tests/java_api/RsNbody/src/com/example/android/rs/nbody_gl/
DBasicGLRenderer.java66 float ratio = (float) width / height; in onSurfaceChanged() local
67 Matrix.frustumM(mProjectionMatrix, 0, -ratio / 10, ratio / 10, -.1f, .1f, .1f, 200); in onSurfaceChanged()
/frameworks/base/services/core/java/com/android/server/policy/
DIconUtilities.java94 final float ratio = (float) sourceWidth / sourceHeight; in createIconBitmap() local
96 height = (int) (width / ratio); in createIconBitmap()
98 width = (int) (height * ratio); in createIconBitmap()
/frameworks/base/core/java/android/transition/
DArcMotion.java270 float ratio = (float) Math.sqrt(ratio2); in getPath() local
271 ex = dx + (ratio * (ex - dx)); in getPath()
272 ey = dy + (ratio * (ey - dy)); in getPath()
/frameworks/base/core/java/android/text/style/
DLineHeightSpan.java147 final float ratio = mHeight * 1.0f / originHeight; in chooseHeight() local
148 fm.descent = Math.round(fm.descent * ratio); in chooseHeight()
/frameworks/native/opengl/tests/gl_jni/jni/
Dgl_code.cpp98 float ratio = width / height; in init_scene() local
103 glFrustumf(-ratio, ratio, -1, 1, 1, 10); in init_scene()
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/glrenderer/
DGLCanvas.java110 float ratio, int x, int y, int w, int h); in drawMixed() argument
117 float ratio, RectF src, RectF target); in drawMixed() argument
/frameworks/native/services/surfaceflinger/Scheduler/
DScheduler.cpp564 float ratio = mRefreshRateConfigs.getRefreshRateFromType(currRefreshRateType).fps / in calculateRefreshRateType() local
566 if (std::abs(std::round(ratio) - ratio) > MARGIN) { in calculateRefreshRateType()
568 ratio = iter->second.fps / float(mContentRefreshRate); in calculateRefreshRateType()
570 if (std::abs(std::round(ratio) - ratio) <= MARGIN) { in calculateRefreshRateType()
/frameworks/native/opengl/tests/tritex/
Dtritex.cpp183 float ratio = 320.0f / 480.0f; in init_scene() local
188 glFrustumf(-ratio, ratio, -1, 1, 1, 10); in init_scene()
/frameworks/base/core/java/com/android/internal/colorextraction/drawable/
DScrimDrawable.java75 float ratio = (float) animation.getAnimatedValue(); in setColor()
76 mMainColor = ColorUtils.blendARGB(mainFrom, mainColor, ratio); in setColor()

123