| Index: third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.h
|
| diff --git a/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.h b/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.h
|
| index 8ed5756c8c4a8ee02656fef359b197005f56dd2a..19938f7950befaa19fa57800ef348098e88f74cf 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.h
|
| +++ b/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.h
|
| @@ -23,14 +23,16 @@ class PLATFORM_EXPORT RecordingImageBufferSurface : public ImageBufferSurface {
|
| USING_FAST_MALLOC(RecordingImageBufferSurface);
|
|
|
| public:
|
| - // If the fallbackFactory is null the buffer surface should only be used
|
| - // for one frame and should not be used for any operations which need a
|
| - // raster surface, (i.e. writePixels).
|
| - // Only #getRecord should be used to access the resulting frame.
|
| - RecordingImageBufferSurface(
|
| - const IntSize&,
|
| - OpacityMode = kNonOpaque,
|
| - const CanvasColorParams& = CanvasColorParams());
|
| + enum AllowFallback : bool { kDisallowFallback, kAllowFallback };
|
| +
|
| + // If |AllowFallback| is kDisallowFallback the buffer surface should only be
|
| + // used for one frame and should not be used for any operations which need a
|
| + // raster surface, (i.e. WritePixels()).
|
| + // Only GetRecord() should be used to access the resulting frame.
|
| + RecordingImageBufferSurface(const IntSize&,
|
| + AllowFallback,
|
| + OpacityMode = kNonOpaque,
|
| + const CanvasColorParams& = CanvasColorParams());
|
| ~RecordingImageBufferSurface() override;
|
|
|
| // Implementation of ImageBufferSurface interfaces
|
| @@ -106,6 +108,7 @@ class PLATFORM_EXPORT RecordingImageBufferSurface : public ImageBufferSurface {
|
| bool FinalizeFrameInternal(FallbackReason*);
|
| int ApproximateOpCount();
|
|
|
| + const AllowFallback allow_fallback_;
|
| std::unique_ptr<PaintRecorder> current_frame_;
|
| sk_sp<PaintRecord> previous_frame_;
|
| std::unique_ptr<UnacceleratedImageBufferSurface> fallback_surface_;
|
|
|