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

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

Issue 1512803004: Use refs for GraphicsContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarTheme
Patch Set: Created 5 years 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 PassRefPtr<SkPicture> getPicture() override; 44 PassRefPtr<SkPicture> getPicture() override;
45 void flush() override; 45 void flush() override;
46 void didDraw(const FloatRect&) override; 46 void didDraw(const FloatRect&) override;
47 bool isValid() const override { return true; } 47 bool isValid() const override { return true; }
48 bool isRecording() const override { return !m_fallbackSurface; } 48 bool isRecording() const override { return !m_fallbackSurface; }
49 bool writePixels(const SkImageInfo& origInfo, const void* pixels, size_t row Bytes, int x, int y) override; 49 bool writePixels(const SkImageInfo& origInfo, const void* pixels, size_t row Bytes, int x, int y) override;
50 void willOverwriteCanvas() override; 50 void willOverwriteCanvas() override;
51 virtual void finalizeFrame(const FloatRect&); 51 virtual void finalizeFrame(const FloatRect&);
52 void setImageBuffer(ImageBuffer*) override; 52 void setImageBuffer(ImageBuffer*) override;
53 PassRefPtr<SkImage> newImageSnapshot(AccelerationHint) override; 53 PassRefPtr<SkImage> newImageSnapshot(AccelerationHint) override;
54 void draw(GraphicsContext*, const FloatRect& destRect, const FloatRect& srcR ect, SkXfermode::Mode) override; 54 void draw(GraphicsContext&, const FloatRect& destRect, const FloatRect& srcR ect, SkXfermode::Mode) override;
55 bool isExpensiveToPaint() override; 55 bool isExpensiveToPaint() override;
56 void setHasExpensiveOp() override { m_currentFrameHasExpensiveOp = true; } 56 void setHasExpensiveOp() override { m_currentFrameHasExpensiveOp = true; }
57 57
58 // Passthroughs to fallback surface 58 // Passthroughs to fallback surface
59 bool restore() override; 59 bool restore() override;
60 WebLayer* layer() const override; 60 WebLayer* layer() const override;
61 bool isAccelerated() const override; 61 bool isAccelerated() const override;
62 void setIsHidden(bool) override; 62 void setIsHidden(bool) override;
63 63
64 private: 64 private:
(...skipping 13 matching lines...) Expand all
78 bool m_frameWasCleared; 78 bool m_frameWasCleared;
79 bool m_didRecordDrawCommandsInCurrentFrame; 79 bool m_didRecordDrawCommandsInCurrentFrame;
80 bool m_currentFrameHasExpensiveOp; 80 bool m_currentFrameHasExpensiveOp;
81 bool m_previousFrameHasExpensiveOp; 81 bool m_previousFrameHasExpensiveOp;
82 OwnPtr<RecordingImageBufferFallbackSurfaceFactory> m_fallbackFactory; 82 OwnPtr<RecordingImageBufferFallbackSurfaceFactory> m_fallbackFactory;
83 }; 83 };
84 84
85 } // namespace blink 85 } // namespace blink
86 86
87 #endif 87 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698