Closed Bug 896670 Opened 12 years ago Closed 12 years ago

createPattern with 'repeat' busted on SkiaGL/PowerVR

Categories

(Core :: Graphics: Canvas2D, defect)

ARM
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: snorp, Assigned: snorp)

Details

Attachments

(2 files)

On a Galaxy Nexus (as well as our panda boards), context.createPattern(canvas, 'repeat') (or 'repeat-x', etc) results in garbage on the canvas.
Skia tries to use GL_REPEAT, which apparently does not work on PowerVR. It s supposed to work if you have the GL_OES_texture_npot extension, which does not appear on the Galaxy Nexus at least. It looks like Skia needs to add another path for lame OpenGL ES here.
I guess we can do something like gl_FragColor = texture2D(tex, vec2(mod(vTexCoords.s, x), mod(vTexCoords.t, y))); where x is texture_width/rect_width and y is texture_height/rect_height? I have no idea how to make Skia do this, though. There is a ton of shader building stuff that I do not understand at all yet.
Comment on attachment 782745 [details] [diff] [review] Flush after creating resized texture in SkiaGL Review of attachment 782745 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/skia/include/core/SkPixelRef.h @@ +28,5 @@ > */ > // #define SK_IGNORE_PIXELREF_SETPRELOCKED > #endif > > + #define SK_IGNORE_PIXELREF_SETPRELOCKED Should this perhaps go in SkUserConfig.h?
(In reply to George Wright (:gw280) from comment #4) > Comment on attachment 782745 [details] [diff] [review] > Flush after creating resized texture in SkiaGL > > Review of attachment 782745 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: gfx/skia/include/core/SkPixelRef.h > @@ +28,5 @@ > > */ > > // #define SK_IGNORE_PIXELREF_SETPRELOCKED > > #endif > > > > + #define SK_IGNORE_PIXELREF_SETPRELOCKED > > Should this perhaps go in SkUserConfig.h? Oh we don't even need that. Oops.
Comment on attachment 782745 [details] [diff] [review] Flush after creating resized texture in SkiaGL Review of attachment 782745 [details] [diff] [review]: ----------------------------------------------------------------- OK then. Looks fine
Attachment #782745 - Flags: review?(gwright) → review+
Attachment #786947 - Flags: review?(gwright) → review+
Assignee: nobody → snorp
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: