Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid apply transform twice for composite context #6906

Merged
merged 1 commit into from
Mar 11, 2016

Conversation

xlc
Copy link
Contributor

@xlc xlc commented Jan 21, 2016

Fixes #6899


This change is Review on Reviewable

@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://107.21.233.14:8877/dfc20518eb1849a/output.txt

@@ -856,7 +856,10 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {

if (this.transparentCanvas) {
this.ctx = this.compositeCtx;
this.ctx.save();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we just call this.ctx.restore() here one more time instead? We have non-pair this.ctx.save() in the beginDrawing method.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that save is called on this.transparentCanvas but in here we want this.compositeCtx have identity transform

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, I understand this part. By looking at beginDrawing, will just restore() do the same thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tried and it doesn't work. Because the initial transformation for the canvas is not identity so restore it will not undo the transformation.

@xlc
Copy link
Contributor Author

xlc commented Mar 10, 2016

@yurydelendik @timvandermeij Is this code good to merge?

@yurydelendik
Copy link
Contributor

Okay, let's take it. Thank you for the patch.

yurydelendik added a commit that referenced this pull request Mar 11, 2016
avoid apply transform twice for composite context
@yurydelendik yurydelendik merged commit c6d2b7f into mozilla:master Mar 11, 2016
@yurydelendik
Copy link
Contributor

/botio-windows test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_test from @yurydelendik received. Current queue size: 1

Live output at: http://107.22.172.223:8877/d2ad7da48090d53/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/d2ad7da48090d53/output.txt

Total script time: 20.79 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@xlc xlc deleted the fix-printing branch March 13, 2016 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants