Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.h

Issue 2653933003: Make stream captures work on canvases that are not in the DOM. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void flush(FlushReason) override; 62 void flush(FlushReason) override;
63 void didDraw(const FloatRect&) override; 63 void didDraw(const FloatRect&) override;
64 bool isValid() const override { return true; } 64 bool isValid() const override { return true; }
65 bool isRecording() const override { return !m_fallbackSurface; } 65 bool isRecording() const override { return !m_fallbackSurface; }
66 bool writePixels(const SkImageInfo& origInfo, 66 bool writePixels(const SkImageInfo& origInfo,
67 const void* pixels, 67 const void* pixels,
68 size_t rowBytes, 68 size_t rowBytes,
69 int x, 69 int x,
70 int y) override; 70 int y) override;
71 void willOverwriteCanvas() override; 71 void willOverwriteCanvas() override;
72 virtual void finalizeFrame(const FloatRect&); 72 void finalizeFrame() override;
73 void doPaintInvalidation(const FloatRect&) override;
73 void setImageBuffer(ImageBuffer*) override; 74 void setImageBuffer(ImageBuffer*) override;
74 sk_sp<SkImage> newImageSnapshot(AccelerationHint, SnapshotReason) override; 75 sk_sp<SkImage> newImageSnapshot(AccelerationHint, SnapshotReason) override;
75 void draw(GraphicsContext&, 76 void draw(GraphicsContext&,
76 const FloatRect& destRect, 77 const FloatRect& destRect,
77 const FloatRect& srcRect, 78 const FloatRect& srcRect,
78 SkBlendMode) override; 79 SkBlendMode) override;
79 bool isExpensiveToPaint() override; 80 bool isExpensiveToPaint() override;
80 void setHasExpensiveOp() override { m_currentFrameHasExpensiveOp = true; } 81 void setHasExpensiveOp() override { m_currentFrameHasExpensiveOp = true; }
81 82
82 // Passthroughs to fallback surface 83 // Passthroughs to fallback surface
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 bool m_frameWasCleared; 139 bool m_frameWasCleared;
139 bool m_didRecordDrawCommandsInCurrentFrame; 140 bool m_didRecordDrawCommandsInCurrentFrame;
140 bool m_currentFrameHasExpensiveOp; 141 bool m_currentFrameHasExpensiveOp;
141 bool m_previousFrameHasExpensiveOp; 142 bool m_previousFrameHasExpensiveOp;
142 std::unique_ptr<RecordingImageBufferFallbackSurfaceFactory> m_fallbackFactory; 143 std::unique_ptr<RecordingImageBufferFallbackSurfaceFactory> m_fallbackFactory;
143 }; 144 };
144 145
145 } // namespace blink 146 } // namespace blink
146 147
147 #endif 148 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698