-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] Conditionally use A8 or R8 format glyph atlas based on capabilities. #50534
Changes from 8 commits
58e9329
b3d9c1e
f3a608f
fdea14a
e06eca8
815c2ee
f456c76
53116aa
42c7e0f
5d2875d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -130,6 +130,11 @@ struct TexImage2DData { | |
| external_format = GL_ALPHA; | ||
| type = GL_UNSIGNED_BYTE; | ||
| break; | ||
| case PixelFormat::kR8UNormInt: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. GL_RED is ES 3.0 and above only. A8 was chosen based on the ES 2.0 floors cap. I agree that we should NOT depend on swizzles however. We observed some pretty dire performance cliffs with swizzles on older drivers. Though, to perform a swizzle via GL_TEXTURE_SWIZZLE_ requires ES 3.0 too. So we can't do it on ES 2.0 (and we shouldn't). I suggest having a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ack, will do some more digging on that. I thought I observed Skia consistently using red bitmaps but that might just be on newer devices.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍🏽 go/es2-reference and go/es3-reference might come in handy. I also have Dash docsets for the different versions so checking up flag compatibility is easier. If you use Dash though. |
||
| internal_format = GL_RED; | ||
| external_format = GL_RED; | ||
| type = GL_UNSIGNED_BYTE; | ||
| break; | ||
| case PixelFormat::kR8G8B8A8UNormInt: | ||
| case PixelFormat::kB8G8R8A8UNormInt: | ||
| case PixelFormat::kR8G8B8A8UNormIntSRGB: | ||
|
|
@@ -161,7 +166,6 @@ struct TexImage2DData { | |
| break; | ||
| case PixelFormat::kUnknown: | ||
| case PixelFormat::kD32FloatS8UInt: | ||
| case PixelFormat::kR8UNormInt: | ||
| case PixelFormat::kR8G8UNormInt: | ||
| case PixelFormat::kB10G10R10XRSRGB: | ||
| case PixelFormat::kB10G10R10XR: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jason-simmons I think this shoudl be enough to get desktop GL working.