On Tue, Sep 4, 2012 at 10:15 AM, Boris Zbarsky bzbar...@mit.edu wrote:
So now our list is:
1) Have a way for pages to opt in to software rendering.
2) Opt canvases in to software rendering via some sort of heuristic
(e.g. software by default until there has been drawing to it for
- Original Message -
On Tue, Sep 4, 2012 at 10:15 AM, Boris Zbarsky bzbar...@mit.edu
wrote:
So now our list is:
1) Have a way for pages to opt in to software rendering.
2) Opt canvases in to software rendering via some sort of
heuristic
(e.g. software by default until
We might be able to do some sort of hack where if a 2D canvas isn't drawn
to for a while (say five seconds), we read back a copy of it for
safe-keeping.
I have to say though, we've been shipping 2D canvas with the context-loss
problem to millions of users for a couple of years now and I don't
On Mon, 03 Sep 2012 23:47:57 +0200, Tobie Langel tobie.lan...@gmail.com
wrote:
I apologize in advance, as this is slightly off-topic. I've been
unsuccessfully looking for info on how Canvas hardware acceleration
actually works and haven't found much.
Would anyone have pointers?
Thanks.
I believe this ship has already sailed for the most part - several major
browsers (starting with IE9) have shipped GPU based canvas 2d
implementations that simply lose the image buffer on a lost context. Given
that there are a fair number of benchmarks (of varying quality) around
canvas 2d speed
On 9/4/12 12:30 PM, James Robinson wrote:
Many applications redraw the entire canvas on every frame
This is already assuming there are frames involved.
There are lots of applications (graphing comes to mind!) where you
really want the canvas to be essentially a write-once-read-forever image.
On 9/4/12 12:43 PM, Boris Zbarsky wrote:
1) Have a way for pages to opt in to software rendering.
2) Opt canvases in to software rendering via some sort of heuristic
(e.g. software by default until there has been drawing to it for
several event loop iterations, or whatever).
3) Have
On Tue, Sep 4, 2012 at 10:43 AM, Boris Zbarsky bzbar...@mit.edu wrote:
On 9/4/12 12:30 PM, James Robinson wrote:
Many applications redraw the entire canvas on every frame
This is already assuming there are frames involved.
There are lots of applications (graphing comes to mind!) where you
On Tue, Sep 4, 2012 at 10:53 AM, Boris Zbarsky bzbar...@mit.edu wrote:
On 9/4/12 12:43 PM, Boris Zbarsky wrote:
1) Have a way for pages to opt in to software rendering.
2) Opt canvases in to software rendering via some sort of heuristic
(e.g. software by default until there has been
On Tue, Sep 4, 2012 at 10:07 AM, David Geary david.mark.ge...@gmail.com wrote:
On Tue, Sep 4, 2012 at 10:53 AM, Boris Zbarsky bzbar...@mit.edu wrote:
Ms2ger points out (without endorsing) that there's an:
8) Have every author who wants their canvas to stick around call
toDataURL() and stick
On 9/4/12 1:02 PM, David Geary wrote:
Sure, but those use cases will be in the minority
What makes you say that?
Outside of games, I think they're a majority of the canvas-using things
I've seen.
I think it makes the most sense to add a context lost handler to the
spec and leave it up to
On 9/4/12 1:07 PM, David Geary wrote:
And then the browser presumably uses the img to regenerate the canvas on
a lost context?
No, then the author just forgets about the broken-ass canvas and shows
the img to the user. Basically using a canvas as a transient buffer
to get the image data
On Tue, Sep 4, 2012 at 11:43 AM, Boris Zbarsky bzbar...@mit.edu wrote:
2) Opt canvases in to software rendering via some sort of heuristic
(e.g. software by default until there has been drawing to it for
several event loop iterations, or whatever).
4) Auto-snapshot based on some
On 12/09/04 10:02, David Geary wrote:
Sure, but those use cases will be in the minority, and we're already
talking about a very rare occurrence in the first place, so the odds of a
very expensive regeneration on a lost context must be near Lotto levels.
It is not a rare occurrence on mobile
On 4 September 2012 19:15, Boris Zbarsky bzbar...@mit.edu wrote:
On 9/4/12 1:02 PM, David Geary wrote:
Sure, but those use cases will be in the minority
What makes you say that?
Outside of games, I think they're a majority of the canvas-using things
I've seen.
I'd like to point out
On Mon, 3 Sep 2012, Glenn Maynard wrote:
As Erik said, taking a snapshot of the canvas is very expensive on some
platforms. If you're rendering a game in realtime, you never have a time
out where you can tolerate an expensive readback.
If you're rendering a game in realtime, the issue
On Tue, Sep 4, 2012 at 11:12 AM, Tab Atkins Jr. jackalm...@gmail.comwrote:
On Tue, Sep 4, 2012 at 10:07 AM, David Geary david.mark.ge...@gmail.com
wrote:
On Tue, Sep 4, 2012 at 10:53 AM, Boris Zbarsky bzbar...@mit.edu wrote:
Ms2ger points out (without endorsing) that there's an:
8)
On 9/4/12 1:20 PM, Glenn Maynard wrote:
The only reason I can think of switch renderers, instead of
snapshotting, is to deal with losing the context *mid*-render, while a
script is still drawing. (That seems like a problem so rare as to be
almost theoretical, though.)
The main reason to
On Tue, Sep 4, 2012 at 10:22 AM, Mark Callow callow_m...@hicorp.co.jpwrote:
It is not a rare occurrence on mobile devices. On my tablet WebGL app's
lose their context every time the tablet goes to sleep. Since the
timeout is so short, it only take a brief distraction and poof! the
tablet is
It sounds like the real issue is mobile:
- it seems pretty difficult to make a desktop lose a context
- most mobile browsers still use software rendering, or at least haven't
had GPU acceleration very long, so there are unlikely to be bug reports
about it
- it sounds like mobile devices lose
On Tue, Sep 4, 2012 at 11:04 AM, Ashley Gullen ash...@scirra.com wrote:
It sounds like the real issue is mobile:
- it seems pretty difficult to make a desktop lose a context
- most mobile browsers still use software rendering, or at least haven't
had GPU acceleration very long, so there are
On Tue, 04 Sep 2012 19:15:46 +0200, Boris Zbarsky bzbar...@mit.edu wrote:
On 9/4/12 1:02 PM, David Geary wrote:
Sure, but those use cases will be in the minority
What makes you say that?
Outside of games, I think they're a majority of the canvas-using things
I've seen.
I think it makes
On Tue, 04 Sep 2012 19:35:32 +0100, Justin Novosad ju...@chromium.org
wrote:
That doesn't sound too evil, but the ideal solution would be one that
would not involve web standards at all. If there was a way of ensuring
GPU
resource persistence on mobile platforms (swap-out resources rather
On Tue, 04 Sep 2012 17:43:11 +0100, Boris Zbarsky bzbar...@mit.edu wrote:
5) Save command stream.
6) Have a way for pages to explicitly snapshot a canvas.
7) Require opt in for hardware accelerated rendering.
Any others?
Of the above, I don't think #5 and #7 are realistic, for what it's
On Tue, 04 Sep 2012 20:49:57 +0200, Kornel Lesiński kor...@geekhood.net
wrote:
until improvements in OS/drivers/hardware make this a non-issue (e.g. if
the OS can notify applications before gfx context is lost, then browsers
could snapshot then and problem will be gone for good)
We've
This might be a silly idea, but what about this:
When all references to the context are lost (garbage collected), simply
store the image on the canvas and make it behave like it was just an image.
This would lose all the state of the context, but since the problem seems
to be mostly with things
(some quotes restored)
On Tue, Sep 4, 2012 at 12:28 PM, Ian Hickson i...@hixie.ch wrote:
Realistically, there are too many pages that have 2D canvases that are
drawn to once and never updated for any solution other than don't
lose the data to be adopted. How exactly this is implemented
On 9/4/12 3:17 PM, Jussi Kalliokoski wrote:
When all references to the context are lost (garbage collected)
That never happens while the canvas itself is alive, since if nothing
else the canvas has a reference to the context.
-Boris
Hmm... Is it visible to the page outside getContext() ?
On Tue, Sep 4, 2012 at 10:21 PM, Boris Zbarsky bzbar...@mit.edu wrote:
On 9/4/12 3:17 PM, Jussi Kalliokoski wrote:
When all references to the context are lost (garbage collected)
That never happens while the canvas itself is alive,
The context is owned by the canvas element. If the canvas element is still
alive then by definition so is the context.
--Oliver
On Sep 4, 2012, at 12:31 PM, Jussi Kalliokoski jussi.kallioko...@gmail.com
wrote:
Hmm... Is it visible to the page outside getContext() ?
On Tue, Sep 4, 2012 at
On 9/4/12 3:31 PM, Jussi Kalliokoski wrote:
Hmm... Is it visible to the page outside getContext() ?
No. Why does that matter?
-Boris
I'm just wondering if there's a way to detect if the canvas was made with
the purpose of drawing a static image.
On providing a better way for those single shot canvases to make sure that
the image is preserved, I think one way would be to add a complementing
method to toDataURL(), being
Rereading the mail thread, it seems like most people want/can live with a
callback that informs the developer that the canvas needs to be recreated.
If the developer doesn't use this new feature, he will get current behavior
where the browser will do snapshotting at reasonable intervals (or fail
On 9/4/2012 10:12 PM, Rik Cabanier wrote:
Rereading the mail thread, it seems like most people want/can live with a
callback that informs the developer that the canvas needs to be recreated.
Wouldn't this be more appropriate as a webgl-2d extension?
It seems like webgl support is a
On Mon, 03 Sep 2012 00:14:49 +0200, Benoit Jacob bja...@mozilla.com
wrote:
- Original Message -
On Sun, 2 Sep 2012, Erik Möller wrote:
As we hardware accelerate the rendering of , not just with
the webgl
context, we have to figure out how to best handle the fact that
GPUs loose
On Mon, 03 Sep 2012 03:37:24 +0200, Charles Pritchard ch...@jumis.com
wrote:
Canvas GPU acceleration today is done via transform3d and transitions.
I hope everyone are aware that this connection is just coincidental. The
fact that one vendor decided to flip the hardware acceleration
- Original Message -
On Mon, 03 Sep 2012 00:14:49 +0200, Benoit Jacob bja...@mozilla.com
wrote:
- Original Message -
On Sun, 2 Sep 2012, Erik Möller wrote:
As we hardware accelerate the rendering of , not just with
the webgl
context, we have to figure out how
- Original Message -
What is really meant here by Canvas GPU acceleration?
This means use GL/D3D to implement the 2D canvas drawing primitives; but what
really matters here, is that this requires using a GL/D3D texture/surface as
the primary storage for the 2D canvas drawing buffer.
On Sun, 2 Sep 2012, Benoit Jacob wrote:
Realistically, there are too many pages that have 2D canvases that are
drawn to once and never updated for any solution other than don't
lose the data to be adopted. How exactly this is implemented is a
quality of implementation issue.
With
On Mon, Sep 3, 2012 at 11:11 AM, Ian Hickson i...@hixie.ch wrote:
There are ways to make it work without forgoing acceleration, e.g. taking
regular backups of the canvas contents, remembering every instruction
that was sent to the canvas, etc.
As Erik said, taking a snapshot of the canvas is
On Mon, Sep 3, 2012 at 7:21 AM, Benoit Jacob bja...@mozilla.com wrote:
- Original Message -
What is really meant here by Canvas GPU acceleration?
This means use GL/D3D to implement the 2D canvas drawing primitives; but
what really matters here, is that this requires using a GL/D3D
On Mon, Sep 3, 2012 at 10:31 AM, David Geary david.mark.ge...@gmail.comwrote:
On Mon, Sep 3, 2012 at 7:21 AM, Benoit Jacob bja...@mozilla.com wrote:
- Original Message -
What is really meant here by Canvas GPU acceleration?
This means use GL/D3D to implement the 2D canvas
I apologize in advance, as this is slightly off-topic. I've been
unsuccessfully looking for info on how Canvas hardware acceleration
actually works and haven't found much.
Would anyone have pointers?
Thanks.
--tobie
Hi,
Hardware accelerated Canvas is a necessity. If it is not done than HTML5
will never be able to compete with native platforms. Most applications need
2D rendering for UI but application developers these days demand at par
performance with native counterparts. WebGL is not a good option for 2D
As we hardware accelerate the rendering of canvas, not just with the
webgl context, we have to figure out how to best handle the fact that GPUs
loose the rendering context for various reasons. Reasons for loosing the
context differ from platform to platform but ranges from going into
Why is it prohibitively expensive to handle a lost context automatically in
a canvas 2D?
Having written a 2D engine which supports this (albeit in DirectX), don't
you just need to recreate the surface, set up your render state again,
recreate any textures that were referenced, then continue? (In
On Sun, Sep 2, 2012 at 12:13 PM, Ashley Gullen ash...@scirra.com wrote:
Why is it prohibitively expensive to handle a lost context automatically in
a canvas 2D?
Having written a 2D engine which supports this (albeit in DirectX), don't
you just need to recreate the surface, set up your render
On Sun, 2 Sep 2012, Erik Möller wrote:
As we hardware accelerate the rendering of canvas, not just with the webgl
context, we have to figure out how to best handle the fact that GPUs loose the
rendering context for various reasons. Reasons for loosing the context differ
from platform to
- Original Message -
On Sun, 2 Sep 2012, Erik Möller wrote:
As we hardware accelerate the rendering of , not just with
the webgl
context, we have to figure out how to best handle the fact that
GPUs loose the
rendering context for various reasons. Reasons for loosing the
On Sun, Sep 2, 2012 at 2:24 PM, Ian Hickson i...@hixie.ch wrote:
On Sun, 2 Sep 2012, Erik Möller wrote:
As we hardware accelerate the rendering of canvas, not just with the
webgl
context, we have to figure out how to best handle the fact that GPUs
loose the
rendering context for
On Sun, Sep 2, 2012 at 4:24 PM, Ian Hickson i...@hixie.ch wrote:
Realistically, there are too many pages that have 2D canvases that are
drawn to once and never updated for any solution other than don't lose
the data to be adopted. How exactly this is implemented is a quality of
implementation
On 9/2/2012 5:36 PM, Glenn Maynard wrote:
On Sun, Sep 2, 2012 at 4:24 PM, Ian Hickson i...@hixie.ch wrote:
Realistically, there are too many pages that have 2D canvases that are
drawn to once and never updated for any solution other than don't lose
the data to be adopted. How exactly this is
52 matches
Mail list logo