Closed Bug 1162350 Opened 5 years ago Closed 5 years ago

non-skia build failure - DownscalerInvalidRect undefined

Categories

(Core :: ImageLib, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: stevensn, Assigned: stevensn)

References

Details

Attachments

(1 file, 1 obsolete file)

Bug 1145560 skipped the non-skia #ifdef section at the end of the file.

This is resulting in build errors such as

image/decoders/nsJPEGDecoder.cpp: In member function ‘void mozilla::image::nsJPEGDecoder::OutputScanlines(bool*)’:
 4:13.34 /home/buildbot/buildbot/slave/runtests/build/image/decoders/nsJPEGDecoder.cpp:723:5: error: ‘DownscalerInvalidRect’ was not declared in this scope
 4:13.34      DownscalerInvalidRect invalidRect = mDownscaler->TakeInvalidRect();
 4:13.34      ^
 4:13.34 /home/buildbot/buildbot/slave/runtests/build/image/decoders/nsJPEGDecoder.cpp:723:27: error: expected ‘;’ before ‘invalidRect’
 4:13.34      DownscalerInvalidRect invalidRect = mDownscaler->TakeInvalidRect();
 4:13.34                            ^
 4:13.34 /home/buildbot/buildbot/slave/runtests/build/image/decoders/nsJPEGDecoder.cpp:724:22: error: ‘invalidRect’ was not declared in this scope
 4:13.34      PostInvalidation(invalidRect.mOriginalSizeRect,
Blocks: 1145560
Attached patch 1162350_downscaler.diff (obsolete) — Splinter Review
Attachment #8602487 - Flags: review?(seth)
Comment on attachment 8602487 [details] [diff] [review]
1162350_downscaler.diff

Review of attachment 8602487 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for noticing the problem and for the patch, Steve!

This is a good patch, but there are some formatting issues that I want to make sure get fixed before we check it in. r+ with the issues below resolved.

::: image/src/Downscaler.h
@@ +18,1 @@
>  

Please ensure there's only one blank line here.

@@ +31,5 @@
>  {
>    nsIntRect mOriginalSizeRect;
>    nsIntRect mTargetSizeRect;
>  };
> +#ifdef MOZ_ENABLE_SKIA

Please add a blank line above and below this #ifdef.

@@ +121,1 @@
>  

Please ensure that there is only a single blank line here.

@@ +131,1 @@
>  

Same here; we only want one blank line.

@@ +131,5 @@
>  
>  class Downscaler
>  {
> +private:
> +  gfxSize mSize;

Please remove this. Downscaler doesn't need any state on non-Skia; this just wastes memory.

@@ +154,2 @@
>    void ResetForNextProgressivePass() { }
> +  const gfxSize& Scale() const { return mSize; }

Please put Scale() on the line after TargetSize(), just as in the skia-enabled version of the class, and just return |gfxSize(1.0, 1.0)|.
Attachment #8602487 - Flags: review?(seth) → review+
Patch updated to address Seth's concerns
Attachment #8602487 - Attachment is obsolete: true
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/88c8da455ad8
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.