Bug 753 - Remove nsIImage, gfxIImageFrame, and their implementations, and expose an equivalent api on imgIContainer. r=roc,josh,bz,longsonr,vlad,karlt,jimm,bsmedberg,mfinkle,peterw,peterv sr=vlad,roc
--HG--
rename : gfx/src/shared/gfxImageFrame.cpp => modules/libpr0n/src/imgFrame.cpp
rename : gfx/src/shared/gfxImageFrame.h => modules/libpr0n/src/imgFrame.h
2009-07-21 05:50:15 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2012-05-21 15:12:37 +04:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
Bug 753 - Remove nsIImage, gfxIImageFrame, and their implementations, and expose an equivalent api on imgIContainer. r=roc,josh,bz,longsonr,vlad,karlt,jimm,bsmedberg,mfinkle,peterw,peterv sr=vlad,roc
--HG--
rename : gfx/src/shared/gfxImageFrame.cpp => modules/libpr0n/src/imgFrame.cpp
rename : gfx/src/shared/gfxImageFrame.h => modules/libpr0n/src/imgFrame.h
2009-07-21 05:50:15 +04:00
|
|
|
|
2015-05-15 06:52:05 +03:00
|
|
|
#ifndef mozilla_image_imgFrame_h
|
|
|
|
#define mozilla_image_imgFrame_h
|
Bug 753 - Remove nsIImage, gfxIImageFrame, and their implementations, and expose an equivalent api on imgIContainer. r=roc,josh,bz,longsonr,vlad,karlt,jimm,bsmedberg,mfinkle,peterw,peterv sr=vlad,roc
--HG--
rename : gfx/src/shared/gfxImageFrame.cpp => modules/libpr0n/src/imgFrame.cpp
rename : gfx/src/shared/gfxImageFrame.h => modules/libpr0n/src/imgFrame.h
2009-07-21 05:50:15 +04:00
|
|
|
|
2020-04-07 19:07:07 +03:00
|
|
|
#include <functional>
|
2020-01-20 19:18:20 +03:00
|
|
|
#include <utility>
|
Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:
This was done by applying:
```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
from subprocess import Popen, PIPE, check_output, CalledProcessError
diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
- args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+ args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']
if not output_file:
args.append("-i")
```
Then running `./mach clang-format -c <commit-hash>`
Then undoing that patch.
Then running check_spidermonkey_style.py --fixup
Then running `./mach clang-format`
I had to fix four things:
* I needed to move <utility> back down in GuardObjects.h because I was hitting
obscure problems with our system include wrappers like this:
0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94 MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94 ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)
Which I really didn't feel like digging into.
* I had to restore the order of TrustOverrideUtils.h and related files in nss
because the .inc files depend on TrustOverrideUtils.h being included earlier.
* I had to add a missing include to RollingNumber.h
* Also had to partially restore include order in JsepSessionImpl.cpp to avoid
some -WError issues due to some static inline functions being defined in a
header but not used in the rest of the compilation unit.
Differential Revision: https://phabricator.services.mozilla.com/D60327
--HG--
extra : moz-landing-system : lando
2020-01-20 19:19:48 +03:00
|
|
|
|
2018-05-29 15:36:11 +03:00
|
|
|
#include "AnimationParams.h"
|
2015-01-08 11:04:31 +03:00
|
|
|
#include "MainThreadUtils.h"
|
Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:
This was done by applying:
```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
from subprocess import Popen, PIPE, check_output, CalledProcessError
diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
- args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+ args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']
if not output_file:
args.append("-i")
```
Then running `./mach clang-format -c <commit-hash>`
Then undoing that patch.
Then running check_spidermonkey_style.py --fixup
Then running `./mach clang-format`
I had to fix four things:
* I needed to move <utility> back down in GuardObjects.h because I was hitting
obscure problems with our system include wrappers like this:
0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94 MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94 ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)
Which I really didn't feel like digging into.
* I had to restore the order of TrustOverrideUtils.h and related files in nss
because the .inc files depend on TrustOverrideUtils.h being included earlier.
* I had to add a missing include to RollingNumber.h
* Also had to partially restore include order in JsepSessionImpl.cpp to avoid
some -WError issues due to some static inline functions being defined in a
header but not used in the rest of the compilation unit.
Differential Revision: https://phabricator.services.mozilla.com/D60327
--HG--
extra : moz-landing-system : lando
2020-01-20 19:19:48 +03:00
|
|
|
#include "gfxDrawable.h"
|
2021-09-17 18:50:04 +03:00
|
|
|
#include "mozilla/layers/SourceSurfaceSharedData.h"
|
Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:
This was done by applying:
```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
from subprocess import Popen, PIPE, check_output, CalledProcessError
diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
- args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+ args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']
if not output_file:
args.append("-i")
```
Then running `./mach clang-format -c <commit-hash>`
Then undoing that patch.
Then running check_spidermonkey_style.py --fixup
Then running `./mach clang-format`
I had to fix four things:
* I needed to move <utility> back down in GuardObjects.h because I was hitting
obscure problems with our system include wrappers like this:
0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94 MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94 ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)
Which I really didn't feel like digging into.
* I had to restore the order of TrustOverrideUtils.h and related files in nss
because the .inc files depend on TrustOverrideUtils.h being included earlier.
* I had to add a missing include to RollingNumber.h
* Also had to partially restore include order in JsepSessionImpl.cpp to avoid
some -WError issues due to some static inline functions being defined in a
header but not used in the rest of the compilation unit.
Differential Revision: https://phabricator.services.mozilla.com/D60327
--HG--
extra : moz-landing-system : lando
2020-01-20 19:19:48 +03:00
|
|
|
#include "mozilla/Maybe.h"
|
|
|
|
#include "mozilla/MemoryReporting.h"
|
|
|
|
#include "mozilla/Monitor.h"
|
2020-02-11 04:23:37 +03:00
|
|
|
#include "nsRect.h"
|
2014-02-25 07:37:51 +04:00
|
|
|
|
2014-07-10 19:00:31 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace image {
|
|
|
|
|
2014-08-23 00:12:38 +04:00
|
|
|
class ImageRegion;
|
2014-09-11 04:06:45 +04:00
|
|
|
class DrawableFrameRef;
|
|
|
|
class RawAccessFrameRef;
|
2014-08-23 00:12:38 +04:00
|
|
|
|
2015-01-26 01:22:07 +03:00
|
|
|
enum class Opacity : uint8_t { FULLY_OPAQUE, SOME_TRANSPARENCY };
|
2015-01-08 00:07:23 +03:00
|
|
|
|
Bug 753 - Remove nsIImage, gfxIImageFrame, and their implementations, and expose an equivalent api on imgIContainer. r=roc,josh,bz,longsonr,vlad,karlt,jimm,bsmedberg,mfinkle,peterw,peterv sr=vlad,roc
--HG--
rename : gfx/src/shared/gfxImageFrame.cpp => modules/libpr0n/src/imgFrame.cpp
rename : gfx/src/shared/gfxImageFrame.h => modules/libpr0n/src/imgFrame.h
2009-07-21 05:50:15 +04:00
|
|
|
class imgFrame {
|
2021-09-17 18:50:04 +03:00
|
|
|
typedef gfx::SourceSurfaceSharedData SourceSurfaceSharedData;
|
2014-08-23 00:49:54 +04:00
|
|
|
typedef gfx::DrawTarget DrawTarget;
|
2016-05-25 19:01:18 +03:00
|
|
|
typedef gfx::SamplingFilter SamplingFilter;
|
2016-05-27 08:19:38 +03:00
|
|
|
typedef gfx::IntPoint IntPoint;
|
|
|
|
typedef gfx::IntRect IntRect;
|
2014-07-10 19:00:31 +04:00
|
|
|
typedef gfx::IntSize IntSize;
|
|
|
|
typedef gfx::SourceSurface SourceSurface;
|
|
|
|
typedef gfx::SurfaceFormat SurfaceFormat;
|
2014-04-20 05:28:38 +04:00
|
|
|
|
Bug 753 - Remove nsIImage, gfxIImageFrame, and their implementations, and expose an equivalent api on imgIContainer. r=roc,josh,bz,longsonr,vlad,karlt,jimm,bsmedberg,mfinkle,peterw,peterv sr=vlad,roc
--HG--
rename : gfx/src/shared/gfxImageFrame.cpp => modules/libpr0n/src/imgFrame.cpp
rename : gfx/src/shared/gfxImageFrame.h => modules/libpr0n/src/imgFrame.h
2009-07-21 05:50:15 +04:00
|
|
|
public:
|
2014-08-23 00:49:54 +04:00
|
|
|
MOZ_DECLARE_REFCOUNTED_TYPENAME(imgFrame)
|
|
|
|
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(imgFrame)
|
|
|
|
|
Bug 753 - Remove nsIImage, gfxIImageFrame, and their implementations, and expose an equivalent api on imgIContainer. r=roc,josh,bz,longsonr,vlad,karlt,jimm,bsmedberg,mfinkle,peterw,peterv sr=vlad,roc
--HG--
rename : gfx/src/shared/gfxImageFrame.cpp => modules/libpr0n/src/imgFrame.cpp
rename : gfx/src/shared/gfxImageFrame.h => modules/libpr0n/src/imgFrame.h
2009-07-21 05:50:15 +04:00
|
|
|
imgFrame();
|
|
|
|
|
2014-09-15 02:22:45 +04:00
|
|
|
/**
|
|
|
|
* Initialize this imgFrame with an empty surface and prepare it for being
|
|
|
|
* written to by a decoder.
|
|
|
|
*
|
|
|
|
* This is appropriate for use with decoded images, but it should not be used
|
|
|
|
* when drawing content into an imgFrame, as it may use a different graphics
|
|
|
|
* backend than normal content drawing.
|
|
|
|
*/
|
2019-03-15 20:29:02 +03:00
|
|
|
nsresult InitForDecoder(const nsIntSize& aImageSize, SurfaceFormat aFormat,
|
Bug 1465619 - Part 6. Add support for recycling to imgFrame. r=tnikkel
Beyond the necessary reinitialization methods, we need to protect
ourselves from recycling a frame that some other entity in the browser
is still using. Generally speaking the animated surface will only be
used in imgFrame::Draw since we don't layerize animated images, which
will be safe. However with OMTP or blob recordings, we could retain a
reference to the surface outside the current stack context. Additional
if something calls RasterImage::GetImageContainer(AtSize) or
RasterImage::GetFrame(AtSize), it may also have a reference to the
surface for an indetermine period of time.
As such, if an imgFrame is a candidate for recycling, it will wrap
imgFrame::mLockedSurface in a RecyclingSourceSurface. Its job is to
track how many consumers there are still of the surface, so that after
we advance the animation, the decoder will know if there are still
outstanding consumers.
If the surface is still in use, it will block for a finite period of
time (the refresh interval) before giving up on reclaiming the surface,
and will allocate a new surface. The old surface can then remain in
circulation for as long as necessary without further blocking the
animation progression, since we stop recycling that surface/imgFrame.
Differential Revision: https://phabricator.services.mozilla.com/D7511
2018-06-04 02:42:09 +03:00
|
|
|
bool aNonPremult,
|
|
|
|
const Maybe<AnimationParams>& aAnimParams,
|
2019-03-15 20:29:02 +03:00
|
|
|
bool aShouldRecycle);
|
2014-09-15 02:22:45 +04:00
|
|
|
|
Bug 1465619 - Part 6. Add support for recycling to imgFrame. r=tnikkel
Beyond the necessary reinitialization methods, we need to protect
ourselves from recycling a frame that some other entity in the browser
is still using. Generally speaking the animated surface will only be
used in imgFrame::Draw since we don't layerize animated images, which
will be safe. However with OMTP or blob recordings, we could retain a
reference to the surface outside the current stack context. Additional
if something calls RasterImage::GetImageContainer(AtSize) or
RasterImage::GetFrame(AtSize), it may also have a reference to the
surface for an indetermine period of time.
As such, if an imgFrame is a candidate for recycling, it will wrap
imgFrame::mLockedSurface in a RecyclingSourceSurface. Its job is to
track how many consumers there are still of the surface, so that after
we advance the animation, the decoder will know if there are still
outstanding consumers.
If the surface is still in use, it will block for a finite period of
time (the refresh interval) before giving up on reclaiming the surface,
and will allocate a new surface. The old surface can then remain in
circulation for as long as necessary without further blocking the
animation progression, since we stop recycling that surface/imgFrame.
Differential Revision: https://phabricator.services.mozilla.com/D7511
2018-06-04 02:42:09 +03:00
|
|
|
/**
|
|
|
|
* Reinitialize this imgFrame with the new parameters, but otherwise retain
|
|
|
|
* the underlying buffer.
|
|
|
|
*
|
|
|
|
* This is appropriate for use with animated images, where the decoder was
|
|
|
|
* given an IDecoderFrameRecycler object which may yield a recycled imgFrame
|
|
|
|
* that was discarded to save memory.
|
|
|
|
*/
|
|
|
|
nsresult InitForDecoderRecycle(const AnimationParams& aAnimParams);
|
2014-09-15 02:22:45 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize this imgFrame with a new surface and draw the provided
|
|
|
|
* gfxDrawable into it.
|
|
|
|
*
|
|
|
|
* This is appropriate to use when drawing content into an imgFrame, as it
|
|
|
|
* uses the same graphics backend as normal content drawing. The downside is
|
|
|
|
* that the underlying surface may not be stored in a volatile buffer on all
|
2014-11-27 00:22:10 +03:00
|
|
|
* platforms, and raw access to the surface (using RawAccessRef()) may be much
|
|
|
|
* more expensive than in the InitForDecoder() case.
|
2016-09-15 14:53:12 +03:00
|
|
|
*
|
|
|
|
* aBackend specifies the DrawTarget backend type this imgFrame is supposed
|
|
|
|
* to be drawn to.
|
2014-09-15 02:22:45 +04:00
|
|
|
*/
|
|
|
|
nsresult InitWithDrawable(gfxDrawable* aDrawable, const nsIntSize& aSize,
|
|
|
|
const SurfaceFormat aFormat,
|
2016-05-25 19:01:18 +03:00
|
|
|
SamplingFilter aSamplingFilter,
|
2019-08-19 14:16:27 +03:00
|
|
|
uint32_t aImageFlags, gfx::BackendType aBackend);
|
2014-09-15 02:22:45 +04:00
|
|
|
|
2014-09-11 04:06:45 +04:00
|
|
|
DrawableFrameRef DrawableRef();
|
2018-05-29 15:36:12 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a RawAccessFrameRef for the frame.
|
|
|
|
*/
|
2021-09-17 18:50:04 +03:00
|
|
|
RawAccessFrameRef RawAccessRef();
|
2018-05-31 02:35:40 +03:00
|
|
|
|
2014-08-23 00:12:38 +04:00
|
|
|
bool Draw(gfxContext* aContext, const ImageRegion& aRegion,
|
2017-01-03 08:53:22 +03:00
|
|
|
SamplingFilter aSamplingFilter, uint32_t aImageFlags,
|
|
|
|
float aOpacity);
|
Bug 753 - Remove nsIImage, gfxIImageFrame, and their implementations, and expose an equivalent api on imgIContainer. r=roc,josh,bz,longsonr,vlad,karlt,jimm,bsmedberg,mfinkle,peterw,peterv sr=vlad,roc
--HG--
rename : gfx/src/shared/gfxImageFrame.cpp => modules/libpr0n/src/imgFrame.cpp
rename : gfx/src/shared/gfxImageFrame.h => modules/libpr0n/src/imgFrame.h
2009-07-21 05:50:15 +04:00
|
|
|
|
2015-03-31 20:48:00 +03:00
|
|
|
nsresult ImageUpdated(const nsIntRect& aUpdateRect);
|
Bug 753 - Remove nsIImage, gfxIImageFrame, and their implementations, and expose an equivalent api on imgIContainer. r=roc,josh,bz,longsonr,vlad,karlt,jimm,bsmedberg,mfinkle,peterw,peterv sr=vlad,roc
--HG--
rename : gfx/src/shared/gfxImageFrame.cpp => modules/libpr0n/src/imgFrame.cpp
rename : gfx/src/shared/gfxImageFrame.h => modules/libpr0n/src/imgFrame.h
2009-07-21 05:50:15 +04:00
|
|
|
|
2015-01-08 11:04:31 +03:00
|
|
|
/**
|
|
|
|
* Mark this imgFrame as completely decoded, and set final options.
|
|
|
|
*
|
2015-01-12 06:28:02 +03:00
|
|
|
* You must always call either Finish() or Abort() before releasing the last
|
|
|
|
* RawAccessFrameRef pointing to an imgFrame.
|
|
|
|
*
|
2015-01-08 11:04:31 +03:00
|
|
|
* @param aFrameOpacity Whether this imgFrame is opaque.
|
2017-02-08 23:48:59 +03:00
|
|
|
* @param aFinalize Finalize the underlying surface (e.g. so that it
|
|
|
|
* may be marked as read only if possible).
|
2015-01-08 11:04:31 +03:00
|
|
|
*/
|
2015-01-12 06:28:02 +03:00
|
|
|
void Finish(Opacity aFrameOpacity = Opacity::SOME_TRANSPARENCY,
|
2022-05-07 09:50:47 +03:00
|
|
|
bool aFinalize = true,
|
|
|
|
bool aOrientationSwapsWidthAndHeight = false);
|
2015-01-12 06:28:02 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Mark this imgFrame as aborted. This informs the imgFrame that if it isn't
|
|
|
|
* completely decoded now, it never will be.
|
|
|
|
*
|
|
|
|
* You must always call either Finish() or Abort() before releasing the last
|
|
|
|
* RawAccessFrameRef pointing to an imgFrame.
|
|
|
|
*/
|
|
|
|
void Abort();
|
|
|
|
|
2016-04-01 20:44:17 +03:00
|
|
|
/**
|
|
|
|
* Returns true if this imgFrame has been aborted.
|
|
|
|
*/
|
|
|
|
bool IsAborted() const;
|
|
|
|
|
2015-01-12 06:28:02 +03:00
|
|
|
/**
|
|
|
|
* Returns true if this imgFrame is completely decoded.
|
|
|
|
*/
|
2016-03-24 03:31:42 +03:00
|
|
|
bool IsFinished() const;
|
2015-01-12 06:28:02 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Blocks until this imgFrame is either completely decoded, or is marked as
|
|
|
|
* aborted.
|
|
|
|
*
|
|
|
|
* Note that calling this on the main thread _blocks the main thread_. Be very
|
|
|
|
* careful in your use of this method to avoid excessive main thread jank or
|
|
|
|
* deadlock.
|
|
|
|
*/
|
2016-03-24 03:31:42 +03:00
|
|
|
void WaitUntilFinished() const;
|
2015-01-08 11:04:31 +03:00
|
|
|
|
2015-05-06 08:19:30 +03:00
|
|
|
/**
|
2021-09-17 18:50:04 +03:00
|
|
|
* Returns the number of bytes per pixel this imgFrame requires.
|
2015-05-06 08:19:30 +03:00
|
|
|
*/
|
2019-03-15 20:29:02 +03:00
|
|
|
uint32_t GetBytesPerPixel() const { return 4; }
|
2015-05-06 08:19:30 +03:00
|
|
|
|
2019-03-15 20:29:02 +03:00
|
|
|
const IntSize& GetSize() const { return mImageSize; }
|
|
|
|
IntRect GetRect() const { return IntRect(IntPoint(0, 0), mImageSize); }
|
2018-05-29 15:36:11 +03:00
|
|
|
const IntRect& GetBlendRect() const { return mBlendRect; }
|
|
|
|
IntRect GetBoundedBlendRect() const {
|
2019-03-15 20:29:02 +03:00
|
|
|
return mBlendRect.Intersect(GetRect());
|
2018-05-29 15:36:11 +03:00
|
|
|
}
|
2022-05-24 15:23:38 +03:00
|
|
|
nsIntRect GetDecodedRect() const {
|
|
|
|
MonitorAutoLock lock(mMonitor);
|
|
|
|
return mDecoded;
|
|
|
|
}
|
2018-05-29 15:36:11 +03:00
|
|
|
FrameTimeout GetTimeout() const { return mTimeout; }
|
|
|
|
BlendMethod GetBlendMethod() const { return mBlendMethod; }
|
|
|
|
DisposalMethod GetDisposalMethod() const { return mDisposalMethod; }
|
2019-11-12 21:22:33 +03:00
|
|
|
bool FormatHasAlpha() const { return mFormat == SurfaceFormat::OS_RGBA; }
|
2015-03-31 20:48:00 +03:00
|
|
|
void GetImageData(uint8_t** aData, uint32_t* length) const;
|
2013-06-14 17:42:01 +04:00
|
|
|
uint8_t* GetImageData() const;
|
2015-01-08 11:04:31 +03:00
|
|
|
|
2018-09-17 22:06:28 +03:00
|
|
|
const IntRect& GetDirtyRect() const { return mDirtyRect; }
|
|
|
|
void SetDirtyRect(const IntRect& aDirtyRect) { mDirtyRect = aDirtyRect; }
|
|
|
|
|
2017-02-08 23:48:59 +03:00
|
|
|
void FinalizeSurface();
|
2016-08-18 22:43:16 +03:00
|
|
|
already_AddRefed<SourceSurface> GetSourceSurface();
|
Bug 753 - Remove nsIImage, gfxIImageFrame, and their implementations, and expose an equivalent api on imgIContainer. r=roc,josh,bz,longsonr,vlad,karlt,jimm,bsmedberg,mfinkle,peterw,peterv sr=vlad,roc
--HG--
rename : gfx/src/shared/gfxImageFrame.cpp => modules/libpr0n/src/imgFrame.cpp
rename : gfx/src/shared/gfxImageFrame.h => modules/libpr0n/src/imgFrame.h
2009-07-21 05:50:15 +04:00
|
|
|
|
2020-02-06 01:22:13 +03:00
|
|
|
struct AddSizeOfCbData : public SourceSurface::SizeOfInfo {
|
2018-09-25 16:13:51 +03:00
|
|
|
AddSizeOfCbData()
|
2020-02-06 01:22:13 +03:00
|
|
|
: SourceSurface::SizeOfInfo(), mIndex(0), mFinished(false) {}
|
|
|
|
|
|
|
|
size_t mIndex;
|
|
|
|
bool mFinished;
|
2018-09-25 16:13:51 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef std::function<void(AddSizeOfCbData& aMetadata)> AddSizeOfCb;
|
|
|
|
|
|
|
|
void AddSizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
|
|
|
|
const AddSizeOfCb& aCallback) const;
|
Bug 753 - Remove nsIImage, gfxIImageFrame, and their implementations, and expose an equivalent api on imgIContainer. r=roc,josh,bz,longsonr,vlad,karlt,jimm,bsmedberg,mfinkle,peterw,peterv sr=vlad,roc
--HG--
rename : gfx/src/shared/gfxImageFrame.cpp => modules/libpr0n/src/imgFrame.cpp
rename : gfx/src/shared/gfxImageFrame.h => modules/libpr0n/src/imgFrame.h
2009-07-21 05:50:15 +04:00
|
|
|
|
2013-06-14 17:42:01 +04:00
|
|
|
private: // methods
|
2014-08-23 00:49:54 +04:00
|
|
|
~imgFrame();
|
|
|
|
|
2022-03-21 23:04:39 +03:00
|
|
|
bool AreAllPixelsWritten() const REQUIRES(mMonitor);
|
2015-01-08 11:04:31 +03:00
|
|
|
nsresult ImageUpdatedInternal(const nsIntRect& aUpdateRect);
|
2015-03-31 20:48:00 +03:00
|
|
|
void GetImageDataInternal(uint8_t** aData, uint32_t* length) const;
|
2015-01-08 11:04:31 +03:00
|
|
|
uint32_t GetImageBytesPerRow() const;
|
|
|
|
uint32_t GetImageDataLength() const;
|
2017-02-08 23:48:59 +03:00
|
|
|
void FinalizeSurfaceInternal();
|
2020-06-11 20:49:13 +03:00
|
|
|
already_AddRefed<SourceSurface> GetSourceSurfaceInternal();
|
2015-01-08 11:04:31 +03:00
|
|
|
|
2010-08-13 17:30:02 +04:00
|
|
|
struct SurfaceWithFormat {
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<gfxDrawable> mDrawable;
|
2014-04-20 05:28:38 +04:00
|
|
|
SurfaceFormat mFormat;
|
2018-06-14 08:21:37 +03:00
|
|
|
SurfaceWithFormat() : mFormat(SurfaceFormat::UNKNOWN) {}
|
2014-04-20 05:28:38 +04:00
|
|
|
SurfaceWithFormat(gfxDrawable* aDrawable, SurfaceFormat aFormat)
|
2015-03-31 20:48:00 +03:00
|
|
|
: mDrawable(aDrawable), mFormat(aFormat) {}
|
2018-06-04 02:37:17 +03:00
|
|
|
SurfaceWithFormat(SurfaceWithFormat&& aOther)
|
|
|
|
: mDrawable(std::move(aOther.mDrawable)), mFormat(aOther.mFormat) {}
|
|
|
|
SurfaceWithFormat& operator=(SurfaceWithFormat&& aOther) {
|
|
|
|
mDrawable = std::move(aOther.mDrawable);
|
|
|
|
mFormat = aOther.mFormat;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
SurfaceWithFormat& operator=(const SurfaceWithFormat& aOther) = delete;
|
|
|
|
SurfaceWithFormat(const SurfaceWithFormat& aOther) = delete;
|
2011-09-29 10:19:26 +04:00
|
|
|
bool IsValid() { return !!mDrawable; }
|
2010-08-13 17:30:02 +04:00
|
|
|
};
|
|
|
|
|
2016-07-31 00:49:03 +03:00
|
|
|
SurfaceWithFormat SurfaceForDrawing(bool aDoPartialDecode, bool aDoTile,
|
2014-08-23 00:12:38 +04:00
|
|
|
ImageRegion& aRegion,
|
2014-04-20 05:28:38 +04:00
|
|
|
SourceSurface* aSurface);
|
2010-03-12 13:08:25 +03:00
|
|
|
|
Bug 753 - Remove nsIImage, gfxIImageFrame, and their implementations, and expose an equivalent api on imgIContainer. r=roc,josh,bz,longsonr,vlad,karlt,jimm,bsmedberg,mfinkle,peterw,peterv sr=vlad,roc
--HG--
rename : gfx/src/shared/gfxImageFrame.cpp => modules/libpr0n/src/imgFrame.cpp
rename : gfx/src/shared/gfxImageFrame.h => modules/libpr0n/src/imgFrame.h
2009-07-21 05:50:15 +04:00
|
|
|
private: // data
|
2015-01-08 11:04:31 +03:00
|
|
|
friend class DrawableFrameRef;
|
|
|
|
friend class RawAccessFrameRef;
|
|
|
|
friend class UnlockImageDataRunnable;
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
2015-01-12 06:28:02 +03:00
|
|
|
// Thread-safe mutable data, protected by mMonitor.
|
2015-01-08 11:04:31 +03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2022-03-21 23:04:39 +03:00
|
|
|
mutable Monitor mMonitor;
|
2015-01-08 11:04:31 +03:00
|
|
|
|
2017-01-18 21:31:20 +03:00
|
|
|
/**
|
2021-09-17 18:50:04 +03:00
|
|
|
* Used for rasterized images, this contains the raw pixel data.
|
2017-01-18 21:31:20 +03:00
|
|
|
*/
|
2022-03-21 23:04:39 +03:00
|
|
|
RefPtr<SourceSurfaceSharedData> mRawSurface GUARDED_BY(mMonitor);
|
|
|
|
RefPtr<SourceSurfaceSharedData> mBlankRawSurface GUARDED_BY(mMonitor);
|
Bug 753 - Remove nsIImage, gfxIImageFrame, and their implementations, and expose an equivalent api on imgIContainer. r=roc,josh,bz,longsonr,vlad,karlt,jimm,bsmedberg,mfinkle,peterw,peterv sr=vlad,roc
--HG--
rename : gfx/src/shared/gfxImageFrame.cpp => modules/libpr0n/src/imgFrame.cpp
rename : gfx/src/shared/gfxImageFrame.h => modules/libpr0n/src/imgFrame.h
2009-07-21 05:50:15 +04:00
|
|
|
|
2017-01-18 21:31:20 +03:00
|
|
|
/**
|
2021-09-17 18:50:04 +03:00
|
|
|
* Used for vector images that were not rasterized directly. This might be a
|
|
|
|
* blob recording or native surface.
|
2017-01-18 21:31:20 +03:00
|
|
|
*/
|
2022-03-21 23:04:39 +03:00
|
|
|
RefPtr<SourceSurface> mOptSurface GUARDED_BY(mMonitor);
|
2015-01-08 11:04:31 +03:00
|
|
|
|
2022-03-21 23:04:39 +03:00
|
|
|
nsIntRect mDecoded GUARDED_BY(mMonitor);
|
2015-01-08 11:04:31 +03:00
|
|
|
|
2022-03-21 23:04:39 +03:00
|
|
|
bool mAborted GUARDED_BY(mMonitor);
|
|
|
|
bool mFinished GUARDED_BY(mMonitor);
|
|
|
|
bool mShouldRecycle GUARDED_BY(mMonitor);
|
2015-01-08 11:04:31 +03:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Effectively const data, only mutated in the Init methods.
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-09-17 22:06:28 +03:00
|
|
|
//! The size of the buffer we are decoding to.
|
2014-11-27 00:22:10 +03:00
|
|
|
IntSize mImageSize;
|
2018-09-17 22:06:28 +03:00
|
|
|
|
|
|
|
//! The contents for the frame, as represented in the encoded image. This may
|
|
|
|
//! differ from mImageSize because it may be a partial frame. For the first
|
|
|
|
//! frame, this means we need to shift the data in place, and for animated
|
|
|
|
//! frames, it likely need to combine with a previous frame to get the full
|
|
|
|
//! contents.
|
2018-05-29 15:36:11 +03:00
|
|
|
IntRect mBlendRect;
|
|
|
|
|
2018-09-17 22:06:28 +03:00
|
|
|
//! This is the region that has changed between this frame and the previous
|
|
|
|
//! frame of an animation. For the first frame, this will be the same as
|
|
|
|
//! mFrameRect.
|
|
|
|
IntRect mDirtyRect;
|
|
|
|
|
2018-05-29 15:36:11 +03:00
|
|
|
//! The timeout for this frame.
|
|
|
|
FrameTimeout mTimeout;
|
|
|
|
|
|
|
|
DisposalMethod mDisposalMethod;
|
|
|
|
BlendMethod mBlendMethod;
|
|
|
|
SurfaceFormat mFormat;
|
Bug 753 - Remove nsIImage, gfxIImageFrame, and their implementations, and expose an equivalent api on imgIContainer. r=roc,josh,bz,longsonr,vlad,karlt,jimm,bsmedberg,mfinkle,peterw,peterv sr=vlad,roc
--HG--
rename : gfx/src/shared/gfxImageFrame.cpp => modules/libpr0n/src/imgFrame.cpp
rename : gfx/src/shared/gfxImageFrame.h => modules/libpr0n/src/imgFrame.h
2009-07-21 05:50:15 +04:00
|
|
|
|
2015-01-08 11:04:31 +03:00
|
|
|
bool mNonPremult;
|
Bug 753 - Remove nsIImage, gfxIImageFrame, and their implementations, and expose an equivalent api on imgIContainer. r=roc,josh,bz,longsonr,vlad,karlt,jimm,bsmedberg,mfinkle,peterw,peterv sr=vlad,roc
--HG--
rename : gfx/src/shared/gfxImageFrame.cpp => modules/libpr0n/src/imgFrame.cpp
rename : gfx/src/shared/gfxImageFrame.h => modules/libpr0n/src/imgFrame.h
2009-07-21 05:50:15 +04:00
|
|
|
};
|
|
|
|
|
2014-09-11 04:06:45 +04:00
|
|
|
/**
|
|
|
|
* A reference to an imgFrame that holds the imgFrame's surface in memory,
|
|
|
|
* allowing drawing. If you have a DrawableFrameRef |ref| and |if (ref)| returns
|
2016-08-18 22:43:16 +03:00
|
|
|
* true, then calls to Draw() and GetSourceSurface() are guaranteed to succeed.
|
2014-09-11 04:06:45 +04:00
|
|
|
*/
|
2015-03-21 19:28:04 +03:00
|
|
|
class DrawableFrameRef final {
|
2017-01-18 21:31:20 +03:00
|
|
|
typedef gfx::DataSourceSurface DataSourceSurface;
|
|
|
|
|
2014-09-11 04:06:45 +04:00
|
|
|
public:
|
|
|
|
DrawableFrameRef() {}
|
|
|
|
|
|
|
|
explicit DrawableFrameRef(imgFrame* aFrame) : mFrame(aFrame) {
|
2017-03-15 15:08:47 +03:00
|
|
|
MOZ_ASSERT(aFrame);
|
|
|
|
MonitorAutoLock lock(aFrame->mMonitor);
|
|
|
|
|
2017-01-18 21:31:20 +03:00
|
|
|
if (aFrame->mRawSurface) {
|
2018-05-29 15:36:13 +03:00
|
|
|
mRef.emplace(aFrame->mRawSurface, DataSourceSurface::READ);
|
2017-01-18 21:31:20 +03:00
|
|
|
if (!mRef->IsMapped()) {
|
|
|
|
mFrame = nullptr;
|
2018-05-29 15:36:13 +03:00
|
|
|
mRef.reset();
|
2017-01-18 21:31:20 +03:00
|
|
|
}
|
Bug 1611127 - Fix how images with optimized surfaces may go missing on Windows. r=tnikkel
On Windows, optimized surfaces can become invalid due to a device reset
or GPU process crash when D2D draw targets were being used. This is
because SourceSurfaceD2D1 checks if the D2D context has changed from the
one it was optimized for.
We assumed when creating a DrawableFrameRef that if we don't have
imgFrame::mRawSurface, then we must have an imgFrame::mOptSurface. This
is incorrect and causes SurfaceCache to believe it has a valid
DrawableSurface, even if the underlying optimized surface cannot be used
for drawing (or has already been freed).
If we can't draw the image, it goes missing from the screen. But since
the cache thinks it has a valid surface, we never actually redecode it.
With this patch, we now check if the imgFrame::mOptSurface has been
freed already, and if not, that it remains valid for drawing purposes.
If either condition is true, the SurfaceCache entry will be removed,
thus permitting a redecode attempt.
Differential Revision: https://phabricator.services.mozilla.com/D60834
--HG--
extra : moz-landing-system : lando
2020-01-24 01:19:40 +03:00
|
|
|
} else if (!aFrame->mOptSurface || !aFrame->mOptSurface->IsValid()) {
|
|
|
|
// The optimized surface has become invalid, so we need to redecode.
|
|
|
|
// For example, on Windows, there may have been a device reset, and
|
|
|
|
// all D2D surfaces now need to be recreated.
|
|
|
|
mFrame = nullptr;
|
2012-09-26 19:33:06 +04:00
|
|
|
}
|
2014-09-11 04:06:45 +04:00
|
|
|
}
|
2012-09-26 19:33:06 +04:00
|
|
|
|
2014-09-11 04:06:45 +04:00
|
|
|
DrawableFrameRef(DrawableFrameRef&& aOther)
|
2020-02-13 17:38:48 +03:00
|
|
|
: mFrame(std::move(aOther.mFrame)), mRef(std::move(aOther.mRef)) {}
|
2012-09-26 19:33:06 +04:00
|
|
|
|
2014-09-11 04:06:45 +04:00
|
|
|
DrawableFrameRef& operator=(DrawableFrameRef&& aOther) {
|
|
|
|
MOZ_ASSERT(this != &aOther, "Self-moves are prohibited");
|
2020-02-13 17:38:48 +03:00
|
|
|
mFrame = std::move(aOther.mFrame);
|
2018-05-30 22:15:35 +03:00
|
|
|
mRef = std::move(aOther.mRef);
|
2014-09-11 04:06:45 +04:00
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2015-02-03 19:52:36 +03:00
|
|
|
explicit operator bool() const { return bool(mFrame); }
|
2014-09-11 04:06:45 +04:00
|
|
|
|
|
|
|
imgFrame* operator->() {
|
|
|
|
MOZ_ASSERT(mFrame);
|
|
|
|
return mFrame;
|
|
|
|
}
|
|
|
|
|
|
|
|
const imgFrame* operator->() const {
|
|
|
|
MOZ_ASSERT(mFrame);
|
|
|
|
return mFrame;
|
|
|
|
}
|
|
|
|
|
|
|
|
imgFrame* get() { return mFrame; }
|
|
|
|
const imgFrame* get() const { return mFrame; }
|
|
|
|
|
|
|
|
void reset() {
|
|
|
|
mFrame = nullptr;
|
2018-05-29 15:36:13 +03:00
|
|
|
mRef.reset();
|
2014-09-11 04:06:45 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
2015-07-01 04:57:03 +03:00
|
|
|
DrawableFrameRef(const DrawableFrameRef& aOther) = delete;
|
2018-05-29 15:36:13 +03:00
|
|
|
DrawableFrameRef& operator=(const DrawableFrameRef& aOther) = delete;
|
2015-07-01 04:57:03 +03:00
|
|
|
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<imgFrame> mFrame;
|
2018-05-29 15:36:13 +03:00
|
|
|
Maybe<DataSourceSurface::ScopedMap> mRef;
|
2014-09-11 04:06:45 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A reference to an imgFrame that holds the imgFrame's surface in memory in a
|
|
|
|
* format appropriate for access as raw data. If you have a RawAccessFrameRef
|
2019-03-15 20:29:02 +03:00
|
|
|
* |ref| and |if (ref)| is true, then calls to GetImageData() is guaranteed to
|
|
|
|
* succeed. This guarantee is stronger than DrawableFrameRef, so everything that
|
|
|
|
* a valid DrawableFrameRef guarantees is also guaranteed by a valid
|
|
|
|
* RawAccessFrameRef.
|
2014-09-11 04:06:45 +04:00
|
|
|
*
|
|
|
|
* This may be considerably more expensive than is necessary just for drawing,
|
|
|
|
* so only use this when you need to read or write the raw underlying image data
|
|
|
|
* that the imgFrame holds.
|
2015-09-20 02:21:02 +03:00
|
|
|
*
|
|
|
|
* Once all an imgFrame's RawAccessFrameRefs go out of scope, new
|
|
|
|
* RawAccessFrameRefs cannot be created.
|
2014-09-11 04:06:45 +04:00
|
|
|
*/
|
2015-03-21 19:28:04 +03:00
|
|
|
class RawAccessFrameRef final {
|
2014-09-11 04:06:45 +04:00
|
|
|
public:
|
2018-05-29 15:36:12 +03:00
|
|
|
RawAccessFrameRef() : mData(nullptr) {}
|
2018-11-30 13:46:48 +03:00
|
|
|
|
2021-09-17 18:50:04 +03:00
|
|
|
explicit RawAccessFrameRef(imgFrame* aFrame)
|
2014-09-11 04:06:45 +04:00
|
|
|
: mFrame(aFrame), mData(nullptr) {
|
|
|
|
MOZ_ASSERT(mFrame, "Need a frame");
|
|
|
|
|
2021-09-17 18:50:04 +03:00
|
|
|
mData = mFrame->GetImageData();
|
2018-05-29 15:36:12 +03:00
|
|
|
if (!mData) {
|
2014-09-11 04:06:45 +04:00
|
|
|
mFrame = nullptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
RawAccessFrameRef(RawAccessFrameRef&& aOther)
|
2020-02-13 17:38:48 +03:00
|
|
|
: mFrame(std::move(aOther.mFrame)), mData(aOther.mData) {
|
2018-05-29 15:36:12 +03:00
|
|
|
aOther.mData = nullptr;
|
|
|
|
}
|
2014-09-11 04:06:45 +04:00
|
|
|
|
2021-09-17 18:50:04 +03:00
|
|
|
~RawAccessFrameRef() {}
|
2014-09-11 04:06:45 +04:00
|
|
|
|
|
|
|
RawAccessFrameRef& operator=(RawAccessFrameRef&& aOther) {
|
|
|
|
MOZ_ASSERT(this != &aOther, "Self-moves are prohibited");
|
|
|
|
|
2020-02-13 17:38:48 +03:00
|
|
|
mFrame = std::move(aOther.mFrame);
|
2018-05-29 15:36:12 +03:00
|
|
|
mData = aOther.mData;
|
|
|
|
aOther.mData = nullptr;
|
2014-09-11 04:06:45 +04:00
|
|
|
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2015-02-03 19:52:36 +03:00
|
|
|
explicit operator bool() const { return bool(mFrame); }
|
2014-09-11 04:06:45 +04:00
|
|
|
|
|
|
|
imgFrame* operator->() {
|
|
|
|
MOZ_ASSERT(mFrame);
|
|
|
|
return mFrame.get();
|
|
|
|
}
|
|
|
|
|
|
|
|
const imgFrame* operator->() const {
|
|
|
|
MOZ_ASSERT(mFrame);
|
|
|
|
return mFrame;
|
|
|
|
}
|
|
|
|
|
|
|
|
imgFrame* get() { return mFrame; }
|
|
|
|
const imgFrame* get() const { return mFrame; }
|
|
|
|
|
|
|
|
void reset() {
|
|
|
|
mFrame = nullptr;
|
2018-05-29 15:36:12 +03:00
|
|
|
mData = nullptr;
|
2014-09-11 04:06:45 +04:00
|
|
|
}
|
|
|
|
|
2018-05-29 15:36:12 +03:00
|
|
|
uint8_t* Data() const { return mData; }
|
|
|
|
|
2014-09-11 04:06:45 +04:00
|
|
|
private:
|
2015-07-01 04:57:03 +03:00
|
|
|
RawAccessFrameRef(const RawAccessFrameRef& aOther) = delete;
|
2018-05-29 15:36:12 +03:00
|
|
|
RawAccessFrameRef& operator=(const RawAccessFrameRef& aOther) = delete;
|
2015-07-01 04:57:03 +03:00
|
|
|
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<imgFrame> mFrame;
|
2018-05-29 15:36:12 +03:00
|
|
|
uint8_t* mData;
|
2014-09-11 04:06:45 +04:00
|
|
|
};
|
2014-07-10 19:00:31 +04:00
|
|
|
|
|
|
|
} // namespace image
|
|
|
|
} // namespace mozilla
|
2012-09-26 19:33:06 +04:00
|
|
|
|
2015-05-15 06:52:05 +03:00
|
|
|
#endif // mozilla_image_imgFrame_h
|