Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
Bug 854446: Allow setting Moz2D recording destination. r=joedrew
Browse files Browse the repository at this point in the history
  • Loading branch information
Bas-moz committed Mar 26, 2013
1 parent c0b548e commit 83f9391
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion gfx/thebes/gfxPlatform.cpp
Expand Up @@ -379,7 +379,17 @@ gfxPlatform::Init()
= do_CreateInstance("@mozilla.org/gfx/init;1");

if (Preferences::GetBool("gfx.2d.recording", false)) {
gPlatform->mRecorder = Factory::CreateEventRecorderForFile("browserrecording.aer");

nsAutoCString fileName;
nsAdoptingString prefFileName = Preferences::GetString("gfx.2d.recordingfile");

if (prefFileName) {
fileName.Append(NS_ConvertUTF16toUTF8(prefFileName));
} else {
fileName.AssignLiteral("browserrecording.aer");
}

gPlatform->mRecorder = Factory::CreateEventRecorderForFile(fileName.BeginReading());
Factory::SetGlobalEventRecorder(gPlatform->mRecorder);
}

Expand Down

0 comments on commit 83f9391

Please sign in to comment.