Closed Bug 891709 Opened 11 years ago Closed 10 years ago

gfx/2d/Factory.cpp wrong include logic?

Categories

(Core :: Graphics, defect)

x86_64
Windows 8
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: c, Assigned: c)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0 (Beta/Release)
Build ID: 20130706191431

Steps to reproduce:

http://mxr.mozilla.org/mozilla-central/source/gfx/2d/Factory.cpp#22 
http://mxr.mozilla.org/mozilla-central/source/gfx/2d/Factory.cpp#288
Can you explain what is wrong?
(In reply to Jeff Muizelaar [:jrmuizel] from comment #1)
> Can you explain what is wrong?

skia can be disabled, then ScaledFontWin.h will not be included, but it's required by line 291.
Attached patch fix_disable-skiaSplinter Review
Component: Graphics → Build Config
Attachment #8416882 - Flags: review?(gps)
Comment on attachment 8416882 [details] [diff] [review]
fix_disable-skia

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

I'm not a peer of gfx. As harmless as this looks, I'm redirecting.
Attachment #8416882 - Flags: review?(gps) → review?(bas)
Assignee: nobody → zhoubcfan
Component: Build Config → Graphics
Comment on attachment 8416882 [details] [diff] [review]
fix_disable-skia

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

I agree with this as well, but to be 100% sure we can use this outside of using Skia, redirecting.
Attachment #8416882 - Flags: review?(bas) → review?(gwright)
Comment on attachment 8416882 [details] [diff] [review]
fix_disable-skia

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

Looks fine to me. All the Skia-specific code in ScaledFontWin is already guarded so we should be fine here.
Attachment #8416882 - Flags: review?(gwright) → review+
(That's not to say things will work, but it's better than the current situation where it potentially won't compile) :)
Ugh, I should probably be more clear. I was replying to Bas's question about whether we can use ScaledFontWin objects with a backend that's not Skia (or at least, that's how I interpreted it?). I think we can, with the Cairo backend, as would be implied by Factory::CreateScaledFontForNativeFont(), but I can't say for sure as I'm not familiar with Cairo.
Attachment #8416882 - Flags: checkin?
Attachment #8416882 - Flags: checkin? → checkin+
https://hg.mozilla.org/mozilla-central/rev/6b8539a2bf06
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: