Home
last modified time | relevance | path

Searched refs:colorSpace (Results 1 – 25 of 30) sorted by relevance

12

/frameworks/base/graphics/java/android/graphics/
DColor.java354 private Color(float r, float g, float b, float a, @NonNull ColorSpace colorSpace) { in Color() argument
356 mColorSpace = colorSpace; in Color()
365 private Color(@Size(min = 4, max = 5) float[] components, @NonNull ColorSpace colorSpace) { in Color() argument
367 mColorSpace = colorSpace; in Color()
451 public Color convert(@NonNull ColorSpace colorSpace) { in convert() argument
452 ColorSpace.Connector connector = ColorSpace.connect(mColorSpace, colorSpace); in convert()
457 return new Color(color, colorSpace); in convert()
703 public static ColorSpace colorSpace(@ColorLong long color) { in colorSpace() method in Color
796 return colorSpace(color).isSrgb(); in isSrgb()
813 return colorSpace(color).isWideGamut(); in isWideGamut()
[all …]
DColorSpace.java1295 public static ColorSpace adapt(@NonNull ColorSpace colorSpace, in adapt() argument
1297 return adapt(colorSpace, whitePoint, Adaptation.BRADFORD); in adapt()
1324 public static ColorSpace adapt(@NonNull ColorSpace colorSpace, in adapt() argument
1327 if (colorSpace.getModel() == Model.RGB) { in adapt()
1328 ColorSpace.Rgb rgb = (ColorSpace.Rgb) colorSpace; in adapt()
1329 if (compare(rgb.mWhitePoint, whitePoint)) return colorSpace; in adapt()
1339 return colorSpace; in adapt()
1399 for (ColorSpace colorSpace : sNamedColorSpaces) { in match()
1400 if (colorSpace.getModel() == Model.RGB) { in match()
1401 ColorSpace.Rgb rgb = (ColorSpace.Rgb) adapt(colorSpace, ILLUMINANT_D50_XYZ); in match()
[all …]
DBitmap.java956 boolean hasAlpha, @NonNull ColorSpace colorSpace) { in createBitmap() argument
957 return createBitmap(null, width, height, config, hasAlpha, colorSpace); in createBitmap()
1011 @NonNull Config config, boolean hasAlpha, @NonNull ColorSpace colorSpace) { in createBitmap() argument
1018 if (colorSpace == null) { in createBitmap()
1025 if (config != Config.ARGB_8888 || colorSpace == ColorSpace.get(ColorSpace.Named.SRGB)) { in createBitmap()
1028 if (!(colorSpace instanceof ColorSpace.Rgb)) { in createBitmap()
1031 ColorSpace.Rgb rgb = (ColorSpace.Rgb) colorSpace; in createBitmap()
/frameworks/base/libs/hwui/utils/
DColor.cpp28 bool transferFunctionCloseToSRGB(const SkColorSpace* colorSpace) { in transferFunctionCloseToSRGB() argument
29 if (colorSpace == nullptr) return true; in transferFunctionCloseToSRGB()
30 if (colorSpace->isSRGB()) return true; in transferFunctionCloseToSRGB()
33 if (colorSpace->isNumericalTransferFn(&transferFunction)) { in transferFunctionCloseToSRGB()
DTestWindowContext.cpp112 sk_sp<SkColorSpace> colorSpace = SkColorSpace::MakeSRGB(); in capturePixels() local
115 kRGBA_8888_SkColorType, kPremul_SkAlphaType, colorSpace); in capturePixels()
DColor.h133 bool transferFunctionCloseToSRGB(const SkColorSpace* colorSpace);
/frameworks/base/core/jni/android/graphics/
DBitmap.cpp452 SkColorSpace* colorSpace = dstBitmap.colorSpace(); in SetPixels() local
454 GraphicsJNI::isColorSpaceSRGB(colorSpace)) { in SetPixels()
463 auto xform = SkColorSpaceXform::New(sRGB.get(), colorSpace); in SetPixels()
671 sk_sp<SkColorSpace> colorSpace; in Bitmap_creator() local
674 colorSpace = GraphicsJNI::colorSpaceForType(colorType); in Bitmap_creator()
678 colorSpace = SkColorSpace::MakeRGB(p, xyzMatrix); in Bitmap_creator()
681 bitmap.setInfo(SkImageInfo::Make(width, height, colorType, kPremul_SkAlphaType, colorSpace)); in Bitmap_creator()
720 if (!srcPM.colorSpace()) { in bitmapCopyTo()
775 if (kRGBA_F16_SkColorType == srcPM.colorType() && !dstPM.colorSpace()) { in bitmapCopyTo()
782 dstPM.colorSpace() == srcPM.colorSpace()) { in bitmapCopyTo()
[all …]
DGraphics.cpp486 bool GraphicsJNI::isColorSpaceSRGB(SkColorSpace* colorSpace) { in isColorSpaceSRGB() argument
487 return colorSpace == nullptr || colorSpace->isSRGB(); in isColorSpaceSRGB()
518 sk_sp<SkColorSpace> GraphicsJNI::getNativeColorSpace(JNIEnv* env, jobject colorSpace) { in getNativeColorSpace() argument
519 if (colorSpace == nullptr) return nullptr; in getNativeColorSpace()
520 if (!env->IsInstanceOf(colorSpace, gColorSpaceRGB_class)) { in getNativeColorSpace()
524 jobject transferParams = env->CallObjectMethod(colorSpace, in getNativeColorSpace()
533 gColorSpace_adaptMethodID, colorSpace, illuminantD50); in getNativeColorSpace()
547 jobject colorSpace = nullptr; in getColorSpace() local
553 colorSpace = env->CallStaticObjectMethod(gColorSpace_class, in getColorSpace()
560 colorSpace = env->CallStaticObjectMethod(gColorSpace_class, in getColorSpace()
[all …]
DBitmapRegionDecoder.cpp135 sk_sp<SkColorSpace> colorSpace = nullptr; in nativeDecodeRegion() local
142 colorSpace = GraphicsJNI::getNativeColorSpace(env, jcolorSpace); in nativeDecodeRegion()
162 decodeColorType, colorSpace); in nativeDecodeRegion()
DGraphicsJNI.h115 static bool isColorSpaceSRGB(SkColorSpace* colorSpace);
119 static sk_sp<SkColorSpace> getNativeColorSpace(JNIEnv* env, jobject colorSpace);
DBitmapFactory.cpp393 if (decodeInfo.colorSpace() && decodeInfo.colorSpace()->isSRGB()) { in doDecode()
/frameworks/native/opengl/libs/EGL/
Degl_object.cpp59 EGLSurface surface, EGLint colorSpace, egl_connection_t const* cnx) in egl_surface_t() argument
66 colorSpace(colorSpace) { in egl_surface_t()
DeglApi.cpp501 EGLint colorSpace = attr[1]; in stripColorSpaceAttribute() local
505 if (colorSpace == it) { in stripColorSpaceAttribute()
529 const EGLint* attrib_list, EGLint& colorSpace, in getColorSpaceAttribute() argument
531 colorSpace = EGL_GL_COLORSPACE_LINEAR_KHR; in getColorSpaceAttribute()
537 colorSpace = attr[1]; in getColorSpaceAttribute()
541 if (colorSpace == EGL_GL_COLORSPACE_SRGB_KHR || in getColorSpaceAttribute()
542 colorSpace == EGL_GL_COLORSPACE_LINEAR_KHR) { in getColorSpaceAttribute()
547 } else if (colorSpace == EGL_EXT_gl_colorspace_bt2020_linear && in getColorSpaceAttribute()
550 } else if (colorSpace == EGL_EXT_gl_colorspace_bt2020_pq && in getColorSpaceAttribute()
553 } else if (colorSpace == EGL_GL_COLORSPACE_SCRGB_EXT && in getColorSpaceAttribute()
[all …]
Degl_object.h135 EGLint colorSpace, egl_connection_t const* cnx);
139 EGLint getColorSpace() const { return colorSpace; } in getColorSpace()
152 EGLint colorSpace; variable
/frameworks/base/libs/hwui/
DTexture.cpp274 && info.colorSpace()->isSRGB()) in hasUnsupportedColorType()
298 bool needSRGB = transferFunctionCloseToSRGB(bitmap.info().colorSpace()); in upload()
319 SkColorSpace* colorSpace = bitmap.info().colorSpace(); in upload() local
321 if (colorSpace != nullptr && !colorSpace->isSRGB()) { in upload()
323 if (!colorSpace->toXYZD50(&xyzMatrix)) { in upload()
327 if (!colorSpace->isNumericalTransferFn(&fn)) { in upload()
DVectorDrawable.cpp578 sk_sp<SkColorSpace> colorSpace = nullptr; in draw() local
580 sk_sp<SkColorSpace> colorSpace = SkColorSpace::MakeSRGB(); in draw() local
583 colorSpace); in draw()
615 sk_sp<SkColorSpace> colorSpace = nullptr; in allocateBitmapIfNeeded() local
617 sk_sp<SkColorSpace> colorSpace = SkColorSpace::MakeSRGB(); in allocateBitmapIfNeeded()
619 SkImageInfo info = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType, colorSpace); in allocateBitmapIfNeeded()
/frameworks/native/opengl/tests/lib/include/
DEGLUtils.h63 static inline String8 decodeColorSpace(EGLint colorSpace);
277 String8 EGLUtils::decodeColorSpace(EGLint colorSpace) { in decodeColorSpace() argument
278 switch (colorSpace) { in decodeColorSpace()
286 return String8::format("UNKNOWN ColorSpace %d", colorSpace); in decodeColorSpace()
/frameworks/base/libs/hwui/pipeline/skia/
DSkiaOpenGLPipeline.cpp306 auto colorSpace = info.colorSpace(); in allocateHardwareBitmap() local
308 if (colorSpace && (!colorSpace->isSRGB())) { in allocateHardwareBitmap()
DVectorDrawableAtlas.cpp250 sk_sp<SkColorSpace> colorSpace = nullptr; in createSurface() local
252 sk_sp<SkColorSpace> colorSpace = SkColorSpace::MakeSRGB(); in createSurface()
254 SkImageInfo info = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType, colorSpace); in createSurface()
/frameworks/base/libs/hwui/hwui/
DBitmap.h74 void setColorSpace(sk_sp<SkColorSpace> colorSpace);
DBitmap.cpp149 void Bitmap::setColorSpace(sk_sp<SkColorSpace> colorSpace) { in setColorSpace() argument
150 mInfo = mInfo.makeColorSpace(std::move(colorSpace)); in setColorSpace()
/frameworks/base/libs/hwui/renderthread/
DVulkanManager.cpp432 VkColorSpaceKHR colorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR; in createSwapchain() local
443 colorSpace = surfaceFormats[i].colorSpace; in createSwapchain()
468 swapchainCreateInfo.imageColorSpace = colorSpace; in createSwapchain()
DOpenGLPipeline.cpp403 bool needSRGB = uirenderer::transferFunctionCloseToSRGB(skBitmap.info().colorSpace()); in allocateHardwareBitmap()
/frameworks/av/media/libstagefright/codec2/include/
DC2Buffer.h1752 virtual const C2ColorSpace colorSpace() const = 0;
1754 virtual void setColorSpace_be(const C2ColorSpace &colorSpace) = 0;
1755 virtual bool setColorSpace(const C2ColorSpace &colorSpace) = 0;
/frameworks/base/core/jni/
Dandroid_view_SurfaceControl.cpp226 sk_sp<SkColorSpace> colorSpace; in nativeScreenshotBitmap() local
228 colorSpace = SkColorSpace::MakeRGB( in nativeScreenshotBitmap()
231 colorSpace = SkColorSpace::MakeSRGB(); in nativeScreenshotBitmap()
238 colorSpace); in nativeScreenshotBitmap()

12