Open
Bug 963559
Opened 12 years ago
Updated 3 years ago
Use deferred canvas in DrawTargetSkia
Categories
(Core :: Graphics: Canvas2D, defect)
Core
Graphics: Canvas2D
Tracking
()
NEW
People
(Reporter: snorp, Unassigned)
Details
Using SkDeferredCanvas or similar should allows to make several optimizations that are impossible right now in the context of SkiaGL. Most importantly:
1) Avoid creating a GL canvas if there is some operation that makes that a bad idea. Bug 963268 is a good example of this. The snapshot code does:
context.scale(scale, scale);
context.drawWindow(window, 0, 0, width, height,
'rgb(255,255,255)', flags);
We want drawWindow() types of usage to have a software canvas, but the scale() call forces a DrawTarget to be created, which will be GL by default. If we have the deferred canvas, we can wait until everything is done to flush it to whatever type of DrawTarget we want.
2) Right now with SkiaGL we always make a copy of the current back buffer after a "frame" has been drawn. With the deferred canvas we can (more easily) detect when the entire canvas is dirty and just skip that step. This should make frame-based games and other similar usages a little faster.
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•