| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef RecordingImageBufferSurface_h | 5 #ifndef RecordingImageBufferSurface_h |
| 6 #define RecordingImageBufferSurface_h | 6 #define RecordingImageBufferSurface_h |
| 7 | 7 |
| 8 #include "platform/graphics/GraphicsContext.h" | 8 #include "platform/graphics/GraphicsContext.h" |
| 9 #include "platform/graphics/ImageBufferSurface.h" | 9 #include "platform/graphics/ImageBufferSurface.h" |
| 10 #include "public/platform/WebThread.h" | 10 #include "public/platform/WebThread.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 void flush(FlushReason) override; | 58 void flush(FlushReason) override; |
| 59 void didDraw(const FloatRect&) override; | 59 void didDraw(const FloatRect&) override; |
| 60 bool isValid() const override { return true; } | 60 bool isValid() const override { return true; } |
| 61 bool isRecording() const override { return !m_fallbackSurface; } | 61 bool isRecording() const override { return !m_fallbackSurface; } |
| 62 bool writePixels(const SkImageInfo& origInfo, | 62 bool writePixels(const SkImageInfo& origInfo, |
| 63 const void* pixels, | 63 const void* pixels, |
| 64 size_t rowBytes, | 64 size_t rowBytes, |
| 65 int x, | 65 int x, |
| 66 int y) override; | 66 int y) override; |
| 67 void willOverwriteCanvas() override; | 67 void willOverwriteCanvas() override; |
| 68 virtual void finalizeFrame(const FloatRect&); | 68 void finalizeFrame() override; |
| 69 void doPaintInvalidation(const FloatRect&) override; |
| 69 void setImageBuffer(ImageBuffer*) override; | 70 void setImageBuffer(ImageBuffer*) override; |
| 70 sk_sp<SkImage> newImageSnapshot(AccelerationHint, SnapshotReason) override; | 71 sk_sp<SkImage> newImageSnapshot(AccelerationHint, SnapshotReason) override; |
| 71 void draw(GraphicsContext&, | 72 void draw(GraphicsContext&, |
| 72 const FloatRect& destRect, | 73 const FloatRect& destRect, |
| 73 const FloatRect& srcRect, | 74 const FloatRect& srcRect, |
| 74 SkBlendMode) override; | 75 SkBlendMode) override; |
| 75 bool isExpensiveToPaint() override; | 76 bool isExpensiveToPaint() override; |
| 76 void setHasExpensiveOp() override { m_currentFrameHasExpensiveOp = true; } | 77 void setHasExpensiveOp() override { m_currentFrameHasExpensiveOp = true; } |
| 77 | 78 |
| 78 // Passthroughs to fallback surface | 79 // Passthroughs to fallback surface |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 bool m_frameWasCleared; | 135 bool m_frameWasCleared; |
| 135 bool m_didRecordDrawCommandsInCurrentFrame; | 136 bool m_didRecordDrawCommandsInCurrentFrame; |
| 136 bool m_currentFrameHasExpensiveOp; | 137 bool m_currentFrameHasExpensiveOp; |
| 137 bool m_previousFrameHasExpensiveOp; | 138 bool m_previousFrameHasExpensiveOp; |
| 138 std::unique_ptr<RecordingImageBufferFallbackSurfaceFactory> m_fallbackFactory; | 139 std::unique_ptr<RecordingImageBufferFallbackSurfaceFactory> m_fallbackFactory; |
| 139 }; | 140 }; |
| 140 | 141 |
| 141 } // namespace blink | 142 } // namespace blink |
| 142 | 143 |
| 143 #endif | 144 #endif |
| OLD | NEW |