Closed Bug 777241 Opened 12 years ago Closed 12 years ago

mozilla::gl::SharedTextureHandle to nsnull cast error

Categories

(Core :: Graphics, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 776876

People

(Reporter: romaxa, Unassigned)

References

Details

Attachments

(1 file)

Compiling on arm EGL provider fail with this error
error: cannot convert 'std::nullptr_t' to 'mozilla::gl::SharedTextureHandle {aka unsigned int}' in return

sounds like we need to cast or return 0 instead of nsnull

SharedTextureHandle - is uintptr_t and nsnull is nullptr.
Attachment #645661 - Flags: review?
Attachment #645661 - Flags: review? → review?(ehsan)
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Comment on attachment 645661 [details] [diff] [review]
Return 0 instead of nullptr for uintptr value

I already vetoed returning 0 :)
Attachment #645661 - Flags: review?(ehsan) → review-
(In reply to Joe Drew (:JOEDREW!) from comment #2)
> Comment on attachment 645661 [details] [diff] [review]
> Return 0 instead of nullptr for uintptr value
> 
> I already vetoed returning 0 :)

I hate to say it but the patch on inbound does exactly this. The reinterpret_cast to SharedTextureHandle failed on b2g/android builds due to in invalid cast:

error: invalid cast from type 'long int' to type 'mozilla::gl::SharedTextureHandle'

I tried a few different iterations, but in the end '0' was the only value that passed on all builds. :/ If you want we can file a bug on finding some other solution or reopen this one as that bug.
With that version we have this build error, which is not very good
ipc/chromium/src/chrome/common/ipc_message_utils.h: In function 'void IPC::WriteParam(IPC::Message*, const P&) [with P = void*]':
../../ipc/ipdl/_ipdlheaders/mozilla/layers/PImageContainerParent.h:219:9:   instantiated from 'void mozilla::layers::PImageContainerParent::Write(const T&, mozilla::layers::PImageContainerParent::Message*) [with T = void*, mozilla::layers::PImageContainerParent::Message = IPC::Message]'
obj-build-linaro-lgl-dbg/ipc/ipdl/PImageContainerParent.cpp:871:32:   instantiated from here
ipc/chromium/src/chrome/common/ipc_message_utils.h:74:3: error: 'Write' is not a member of 'IPC::ParamTraits<void*>'
ipc/chromium/src/chrome/common/ipc_message_utils.h: In function 'bool IPC::ReadParam(const IPC::Message*, void**, P*) [with P = void*]':
../../ipc/ipdl/_ipdlheaders/mozilla/layers/PImageContainerParent.h:229:49:   instantiated from 'bool mozilla::layers::PImageContainerParent::Read(T*, const Message*, void**) [with T = void*, mozilla::layers::PImageContainerParent::Message = IPC::Message]'
obj-build-linaro-lgl-dbg/ipc/ipdl/PImageContainerParent.cpp:886:52:   instantiated from here
ipc/chromium/src/chrome/common/ipc_message_utils.h:80:41: error: 'Read' is not a member of 'IPC::ParamTraits<void*>'
ipc/chromium/src/chrome/common/ipc_message_utils.h:81:1: error: control reaches end of non-void function [-Werror=return-type]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: