Closed Bug 893302 Opened 11 years ago Closed 11 years ago

Convert CanvasClient2D (and Host) to the new textures

Categories

(Core :: Graphics: Layers, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: nical, Unassigned)

References

Details

Attachments

(2 files)

      No description provided.
Attachment #783923 - Flags: review?(nical.bugzilla)
Seems to pass layout/reftests/canvas, no try push because try is closed.
Attachment #783925 - Flags: review?(nical.bugzilla)
Comment on attachment 783923 [details] [diff] [review]
Rename the old CanvasClient classes

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

::: gfx/layers/client/CanvasClient.h
@@ +63,5 @@
>    }
>  
>    virtual void Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer);
> +  virtual void Updated() MOZ_OVERRIDE;
> +  

nit: trailing spaces
Attachment #783923 - Flags: review?(nical.bugzilla) → review+
Comment on attachment 783925 [details] [diff] [review]
Create new CanvasClient2D that uses new textures

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

After our discussion on irc I am expecting another version of this patch which fixes the potential race condition.

::: gfx/layers/client/CanvasClient.cpp
@@ +61,5 @@
> +
> +  if (!mBuffer->Lock(OPEN_READ_WRITE)) {
> +    return;
> +  }
> +  

nit: trailing spaces

@@ +66,5 @@
> +  nsRefPtr<gfxASurface> surface = mBuffer->AsTextureClientSurface()->GetAsSurface();
> +  if (surface) {
> +    aLayer->UpdateSurface(surface);
> +  }
> +    

nit: trailing spaces

::: gfx/layers/client/CanvasClient.h
@@ +63,5 @@
> +  TextureInfo GetTextureInfo() const
> +  {
> +    return TextureInfo(COMPOSITABLE_IMAGE);
> +  }
> +  

nit:trailing space

::: gfx/layers/client/TextureClient.h
@@ +202,5 @@
>  
>    virtual TextureClientSurface* AsTextureClientSurface() MOZ_OVERRIDE { return this; }
>  
>    virtual bool UpdateSurface(gfxASurface* aSurface) MOZ_OVERRIDE;
> +  

nit: trailing spaces
Attachment #783925 - Flags: review?(nical.bugzilla)
Comment on attachment 783925 [details] [diff] [review]
Create new CanvasClient2D that uses new textures

Can we just take this as is, and I'll fix the race for both Canvas and Images with a single patch in the other bug.
Attachment #783925 - Flags: review?(nical.bugzilla)
Comment on attachment 783925 [details] [diff] [review]
Create new CanvasClient2D that uses new textures

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

Ok, please remove the trailing spaces before landing
Attachment #783925 - Flags: review?(nical.bugzilla) → review+
https://hg.mozilla.org/mozilla-central/rev/a525086d0bf2
https://hg.mozilla.org/mozilla-central/rev/760e66b2908e
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: