[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] getContext multiple context language
- To: Mark Callow <email@example.com>
- Subject: Re: [Public WebGL] getContext multiple context language
- From: Kenneth Russell <firstname.lastname@example.org>
- Date: Tue, 2 Feb 2010 14:38:00 -0800
- Cc: Vladimir Vukicevic <email@example.com>, public webgl <firstname.lastname@example.org>
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1265150282; bh=qgD2NaoKLWQot0/hT1k2/35CV9U=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type:Content-Transfer-Encoding; b=TQCC4ocpXZDlqhQsdx9Xm/b6pEJ7ee0q6F/4pHLefKf6cpz0CcMOz+o207xUR8tqS 5xwdZ/G5DZZB5STwaHrIg==
- Domainkey-signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:date:message-id:subject:from:to: cc:content-type:content-transfer-encoding:x-system-of-record; b=nGC/xJyD52sRu0Vx55JyUKkUFc04tdN3x9gcH5yYbUlOyJhMaWuhlt+ln4IBF2glo gn9ilPKnc5kcQzFISNfXw==
- In-reply-to: <4B67FD85.email@example.com>
- References: <4B5A54D2.firstname.lastname@example.org> <4B67FD85.email@example.com>
- Sender: firstname.lastname@example.org
On Tue, Feb 2, 2010 at 2:25 AM, Mark Callow <email@example.com> wrote:
> Apologies for my delayed response. I took a week off.
> The language is fine up until the last paragraph.
> Vladimir Vukicevic wrote:
> Here's the language for getContext() -- let me know of any suggestions
> before I send it off to hixie:
> If multiple rendering contexts are active, they all render to the same
> canvas; they are not layered or otherwise isolated. Changes made to the
> canvas with one context must be immediately visible to any other active
> contexts on the canvas. It is up to the implementation to manage
> synchronization issues associated with rendering with different contexts to
> the same canvas.
> Implicit synchronization is fraught with problems as I have stated many
> times before during this discussion. Lack of explicit synchronization is a
> nightmare for implementers (with the tangled web of checks between contexts
> growing as each new context type is added) and will encourage developers to
> interleave calls in ways that will be horrendously inefficient on any
> hardware that is attempting parallelism, which these days is pretty much
> An explicit waitContext(in DOMString contextId) function should be added to
> the canvas for synchronization between contexts. This would flush commands
> previously issued to "contextId" and wait for them to complete and would be
> required between calls to drawing commands of different contexts.
In earlier discussions it was stated that if the developer fails to
call waitContext() then incorrect or undefined rendering results will
occur. This will lead to nonportable behavior and I don't think it is
a good idea.
If the synchronization checks occur in the implementation, their added
cost is a fetch from thread-local storage per rendering call. Such
checks already exist in the WebKit WebGL implementation and they are
nowhere near the top of the profile, at least at this point. I think
the synchronization among the various contexts should remain implicit.
You are currently subscribe to firstname.lastname@example.org.
To unsubscribe, send an email to email@example.com with
the following command in the body of your email: