Last Comment Bug 776802 - [Azure] gfxPlatform should be more precise in providing info about Azure backends
: [Azure] gfxPlatform should be more precise in providing info about Azure back...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: 15 Branch
: All All
: -- normal (vote)
: mozilla17
Assigned To: Nick Cameron [:nrc]
:
: Milan Sreckovic [:milan]
Mentors:
: 719302 (view as bug list)
Depends on: 748113 764125
Blocks: 778595
  Show dependency treegraph
 
Reported: 2012-07-23 20:34 PDT by Nick Cameron [:nrc]
Modified: 2014-11-13 11:34 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (11.00 KB, patch)
2012-07-29 20:41 PDT, Nick Cameron [:nrc]
bas: review+
Details | Diff | Splinter Review
patch (11.02 KB, patch)
2012-07-30 15:34 PDT, Nick Cameron [:nrc]
ncameron: review+
Details | Diff | Splinter Review

Description Nick Cameron [:nrc] 2012-07-23 20:34:38 PDT
gfxPlatform::SupportsAzure should not return information about Azure backends. gfxPlatform::GetAzureBackendInfo should be removed. If needed we should add API for returning info about the preferred and fallback backends for canvas and content. But, in general any info should be taken from an actual DrawTarget, or there shouls be gfxPlatform methods to create a DrawTarget.

The theory here is that we can support multiple different Azure backends at one time, so the backend which will be used in some situation is not necessarily the one returned by the current gfxPlatform methods, so this info is misleading and possibly dangerous.

about:config should be changed to reflect the more complex nature of Azure backends, i.e., there should not be a single entry for 'Azure backend' but separate ones for canvas and content and canvas fallback.
Comment 1 Nick Cameron [:nrc] 2012-07-23 21:37:33 PDT
Should probably check the various places that query the Azure prefs either directly (hopefully none) or via gfxInfo to make sure they are not assuming a single type of Azure backend.
Comment 2 Nick Cameron [:nrc] 2012-07-29 17:37:27 PDT
In the description, s/about:config/about:support
Comment 3 Nick Cameron [:nrc] 2012-07-29 20:41:34 PDT
Created attachment 647051 [details] [diff] [review]
patch
Comment 4 Bas Schouten (:bas.schouten) 2012-07-29 20:52:20 PDT
Comment on attachment 647051 [details] [diff] [review]
patch

Review of attachment 647051 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/thebes/gfxWindowsPlatform.h
@@ +243,5 @@
>  
>  protected:
> +    virtual mozilla::gfx::BackendType GetContentBackend()
> +    {
> +      return UseAzureContentDrawing() && mD2DDevice ?

Probably better to check for D3D10 layers here.
Comment 5 Nick Cameron [:nrc] 2012-07-29 20:56:57 PDT
(In reply to Bas Schouten (:bas) from comment #4)
> Comment on attachment 647051 [details] [diff] [review]
> patch
> 
> Review of attachment 647051 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: gfx/thebes/gfxWindowsPlatform.h
> @@ +243,5 @@
> >  
> >  protected:
> > +    virtual mozilla::gfx::BackendType GetContentBackend()
> > +    {
> > +      return UseAzureContentDrawing() && mD2DDevice ?
> 
> Probably better to check for D3D10 layers here.

Do you mean instead of checking mD2DDevice?
Comment 6 Nick Cameron [:nrc] 2012-07-29 22:34:44 PDT
(In reply to Bas Schouten (:bas) from comment #4)
> Comment on attachment 647051 [details] [diff] [review]
> patch
> 
> Review of attachment 647051 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: gfx/thebes/gfxWindowsPlatform.h
> @@ +243,5 @@
> >  
> >  protected:
> > +    virtual mozilla::gfx::BackendType GetContentBackend()
> > +    {
> > +      return UseAzureContentDrawing() && mD2DDevice ?
> 
> Probably better to check for D3D10 layers here.

I'm not sure what this means - we might be using different layer managers in different places, but this is a function on a global gfxPlatform object, so I can't check which layer manager is being used, the best option is to take a guess at which backend will be used in general, and that will probably be D2D, if we can use D2D and it is pref'ed on, right?
Comment 7 Nick Cameron [:nrc] 2012-07-30 15:34:01 PDT
Created attachment 647325 [details] [diff] [review]
patch

changed d2d device check to use RenderMode, carrying r=bas

discussed Bas's comment on and this change on irc: no good way to check for D3D10 layers, don't need to be 100% precise here because info is only used for tests
Comment 9 Nick Cameron [:nrc] 2012-07-30 23:23:28 PDT
backed out: https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=cda1c40da986
Comment 10 Ed Morley [:emorley] 2012-07-31 06:07:19 PDT
Unfortunately the bug number in the backout typoed, similar to bug 718849 comment 22 (was listed as bug 776803). I've commented in that bug pointing here, in case people come across it via hg blame.
Comment 11 Ed Morley [:emorley] 2012-07-31 06:23:47 PDT
The landing was manually deselected in m-cMerge, but it ended up being marked still (will file a bug on m-cMerge). Reopening since was backed out.
Comment 13 Ryan VanderMeulen [:RyanVM] 2012-08-01 19:40:06 PDT
https://hg.mozilla.org/mozilla-central/rev/4976c4bb8b27
Comment 14 Kartikaya Gupta (email:kats@mozilla.com) 2014-11-13 11:34:22 PST
*** Bug 719302 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.