Closed Bug 1296739 Opened 8 years ago Closed 8 years ago

gfxPlatform::GetParentDevicePrefs is protected, but invalidly called outside of gfxPlatform

Categories

(Core :: Graphics, defect)

All
Windows
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: froydnj, Unassigned)

References

Details

Attachments

(1 obsolete file)

clang-cl complains about gfxPlatform::GetParentDevicePrefs:

 4:16.97 In file included from C:/m-c/obj-clang-cl-optimized/gfx/thebes/Unified_cpp_gfx_thebes0.cpp:20:
 4:16.97 c:/m-c/gfx/thebes/DeviceManagerD3D11.cpp(108,35):  error: 'GetParentDevicePrefs' is a protected member of 'gfxPlatform'
 4:16.97       gfxPlatform::GetPlatform()->GetParentDevicePrefs().d3d11TextureSharingWorks();
 4:16.97                                   ^
 4:16.97 c:/m-c/gfx/thebes/gfxPlatform.h(740,42):  note: declared protected here
 4:16.97     static mozilla::gfx::DeviceInitData& GetParentDevicePrefs();
 4:16.97                                          ^
 4:16.97 In file included from C:/m-c/obj-clang-cl-optimized/gfx/thebes/Unified_cpp_gfx_thebes0.cpp:20:
 4:16.97 c:/m-c/gfx/thebes/DeviceManagerD3D11.cpp(155,35):  error: 'GetParentDevicePrefs' is a protected member of 'gfxPlatform'
 4:16.97       gfxPlatform::GetPlatform()->GetParentDevicePrefs().adapter();
 4:16.98                                   ^
 4:16.98 c:/m-c/gfx/thebes/gfxPlatform.h(740,42):  note: declared protected here
 4:16.98     static mozilla::gfx::DeviceInitData& GetParentDevicePrefs();
 4:16.98                                          ^
 4:16.98 In file included from C:/m-c/obj-clang-cl-optimized/gfx/thebes/Unified_cpp_gfx_thebes0.cpp:20:
 4:16.98 c:/m-c/gfx/thebes/DeviceManagerD3D11.cpp(469,33):  error: 'GetParentDevicePrefs' is a protected member of 'gfxPlatform'
 4:16.98     gfxPlatform::GetPlatform()->GetParentDevicePrefs().adapter();
 4:16.98                                 ^
 4:16.98 c:/m-c/gfx/thebes/gfxPlatform.h(740,42):  note: declared protected here
 4:16.98     static mozilla::gfx::DeviceInitData& GetParentDevicePrefs();
 4:16.98                                          ^

I don't know exactly how MSVC permits this to compile, but it is blocking attempts at compiling with clang-cl.
Flags: needinfo?(milan)
David, I'm not sure if you'd rather make this method public, or DeviceManagerD3D11 a friend, or some other alternative.  The patch just makes this method public.
Flags: needinfo?(milan)
This *should* be obsoleted by bug 1294988 which removes GetParentDevicePrefs. If I'm wrong just re-open.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Attachment #8783525 - Attachment is obsolete: true
Attachment #8783525 - Flags: review?(dvander)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: