mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1162350 - Define and use DownscalerInvalidRect for non-skia builds. r=seth
This commit is contained in:
parent
95e04ef470
commit
7071d6a9b8
@ -15,7 +15,6 @@
|
||||
#include "mozilla/UniquePtr.h"
|
||||
#include "nsRect.h"
|
||||
|
||||
#ifdef MOZ_ENABLE_SKIA
|
||||
|
||||
namespace skia {
|
||||
class ConvolutionFilter1D;
|
||||
@ -34,6 +33,8 @@ struct DownscalerInvalidRect
|
||||
nsIntRect mTargetSizeRect;
|
||||
};
|
||||
|
||||
#ifdef MOZ_ENABLE_SKIA
|
||||
|
||||
/**
|
||||
* Downscaler is a high-quality, streaming image downscaler based upon Skia's
|
||||
* scaling implementation.
|
||||
@ -119,21 +120,13 @@ private:
|
||||
bool mHasAlpha;
|
||||
};
|
||||
|
||||
} // namespace image
|
||||
} // namespace mozilla
|
||||
|
||||
|
||||
#else
|
||||
|
||||
|
||||
/**
|
||||
* Downscaler requires Skia to work, so we provide a dummy implementation if
|
||||
* Skia is disabled that asserts if constructed.
|
||||
*/
|
||||
|
||||
namespace mozilla {
|
||||
namespace image {
|
||||
|
||||
class Downscaler
|
||||
{
|
||||
public:
|
||||
@ -144,6 +137,7 @@ public:
|
||||
|
||||
const nsIntSize& OriginalSize() const { return nsIntSize(); }
|
||||
const nsIntSize& TargetSize() const { return nsIntSize(); }
|
||||
const gfxSize& Scale() const { return gfxSize(1.0, 1.0); }
|
||||
|
||||
nsresult BeginFrame(const nsIntSize&, uint8_t*, bool)
|
||||
{
|
||||
@ -153,14 +147,13 @@ public:
|
||||
uint8_t* RowBuffer() { return nullptr; }
|
||||
void CommitRow() { }
|
||||
bool HasInvalidation() const { return false; }
|
||||
nsIntRect TakeInvalidRect() { return nsIntRect(); }
|
||||
DownscalerInvalidRect TakeInvalidRect() { return DownscalerInvalidRect(); }
|
||||
void ResetForNextProgressivePass() { }
|
||||
};
|
||||
|
||||
#endif // MOZ_ENABLE_SKIA
|
||||
|
||||
} // namespace image
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // MOZ_ENABLE_SKIA
|
||||
|
||||
#endif // mozilla_image_src_Downscaler_h
|
||||
|
Loading…
Reference in New Issue
Block a user