Closed Bug 759169 Opened 12 years ago Closed 12 years ago

RenderTrace.cpp doesn't compile when MOZ_RENDERTRACE is enabled

Categories

(Core :: Graphics: Layers, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: dhylands, Assigned: dhylands)

Details

Attachments

(1 file)

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.
Comment on attachment 627793 [details] [diff] [review]
Fix for compile error when MOZ_RENDERTRACE is enabled.

Drive-by review. LGTM
Attachment #627793 - Flags: review+
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
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: