Last Comment Bug 759169 - RenderTrace.cpp doesn't compile when MOZ_RENDERTRACE is enabled
: RenderTrace.cpp doesn't compile when MOZ_RENDERTRACE is enabled
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics: Layers (show other bugs)
: unspecified
: x86 Linux
: -- normal (vote)
: mozilla15
Assigned To: Dave Hylands [:dhylands]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-28 12:36 PDT by Dave Hylands [:dhylands]
Modified: 2012-05-30 07:42 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Fix for compile error when MOZ_RENDERTRACE is enabled. (1.40 KB, patch)
2012-05-28 14:38 PDT, Dave Hylands [:dhylands]
bgirard: review+
Details | Diff | Review

Description Dave Hylands [:dhylands] 2012-05-28 12:36:13 PDT
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.
Comment 1 Benoit Girard (:BenWa) 2012-05-28 14:27:27 PDT
You just need to copy it first then it will work. Would be nice if you posted a patch.
Comment 2 Dave Hylands [:dhylands] 2012-05-28 14:38:30 PDT
Created attachment 627793 [details] [diff] [review]
Fix for compile error when MOZ_RENDERTRACE is enabled.
Comment 3 Benoit Girard (:BenWa) 2012-05-28 14:42:58 PDT
Comment on attachment 627793 [details] [diff] [review]
Fix for compile error when MOZ_RENDERTRACE is enabled.

Drive-by review. LGTM
Comment 4 Benoit Girard (:BenWa) 2012-05-29 14:30:26 PDT
It was on my hg outgoing but I forgot to push it:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b48fd5b2b84e
Comment 5 Ed Morley [:emorley] 2012-05-30 07:42:03 PDT
https://hg.mozilla.org/mozilla-central/rev/b48fd5b2b84e

Note You need to log in before you can comment on or make changes to this bug.