The default bug view has changed. See this FAQ.

RenderTrace.cpp doesn't compile when MOZ_RENDERTRACE is enabled

RESOLVED FIXED in mozilla15

Status

()

Core
Graphics: Layers
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dhylands, Assigned: dhylands)

Tracking

unspecified
mozilla15
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
If I try to enable MOZ_RENDERTRACE by uncommenting the line in gfx/layers/RenderTrace.h, then I get the following errors:

/home/work/B2G/gecko/gfx/layers/RenderTrace.cpp: In function 'gfx3DMatrix mozilla::layers::GetRootTransform(mozilla::layers::Layer*)':
/home/work/B2G/gecko/gfx/layers/RenderTrace.cpp:19: error: passing 'const gfx3DMatrix' as 'this' argument of 'gfx3DMatrix& gfx3DMatrix::ProjectTo2D()' discards qualifiers
/home/work/B2G/gecko/gfx/layers/RenderTrace.cpp: In function 'void mozilla::layers::RenderTraceLayers(mozilla::layers::Layer*, const char*, gfx3DMatrix, bool)':
/home/work/B2G/gecko/gfx/layers/RenderTrace.cpp:30: error: passing 'const gfx3DMatrix' as 'this' argument of 'gfx3DMatrix& gfx3DMatrix::ProjectTo2D()' discards qualifiers

which occurs because ProjectTo2D modifies its matrix, but GetTransform returns a const ref.
You just need to copy it first then it will work. Would be nice if you posted a patch.
(Assignee)

Comment 2

5 years ago
Created attachment 627793 [details] [diff] [review]
Fix for compile error when MOZ_RENDERTRACE is enabled.
Comment on attachment 627793 [details] [diff] [review]
Fix for compile error when MOZ_RENDERTRACE is enabled.

Drive-by review. LGTM
Attachment #627793 - Flags: review+
(Assignee)

Updated

5 years ago
Whiteboard: checkin-needed
It was on my hg outgoing but I forgot to push it:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b48fd5b2b84e
Whiteboard: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/b48fd5b2b84e
Assignee: nobody → dhylands
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
You need to log in before you can comment on or make changes to this bug.