If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

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

RESOLVED WORKSFORME

Status

()

Core
Graphics
RESOLVED WORKSFORME
a year ago
a year ago

People

(Reporter: froydnj, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 obsolete attachment)

(Reporter)

Description

a year ago
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)
Comment hidden (mozreview-request)
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
Last Resolved: a year 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.