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

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

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: DrawingDisplayItem 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 /* 1 /*
2 * Copyright (c) 2013, Google Inc. All rights reserved. 2 * Copyright (c) 2013, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef ImageBufferSurface_h 31 #ifndef ImageBufferSurface_h
32 #define ImageBufferSurface_h 32 #define ImageBufferSurface_h
33 33
34 #include "platform/PlatformExport.h" 34 #include "platform/PlatformExport.h"
35 #include "platform/geometry/IntSize.h" 35 #include "platform/geometry/IntSize.h"
36 #include "platform/graphics/GraphicsTypes.h" 36 #include "platform/graphics/GraphicsTypes.h"
37 #include "platform/graphics/paint/PaintCanvas.h"
38 #include "platform/graphics/paint/PaintFlags.h"
39 #include "platform/graphics/paint/PaintRecord.h"
37 #include "third_party/khronos/GLES2/gl2.h" 40 #include "third_party/khronos/GLES2/gl2.h"
38 #include "third_party/skia/include/core/SkImageInfo.h" 41 #include "third_party/skia/include/core/SkImageInfo.h"
39 #include "third_party/skia/include/core/SkPaint.h"
40 #include "third_party/skia/include/core/SkRefCnt.h" 42 #include "third_party/skia/include/core/SkRefCnt.h"
41 #include "wtf/Allocator.h" 43 #include "wtf/Allocator.h"
42 #include "wtf/Noncopyable.h" 44 #include "wtf/Noncopyable.h"
43 45
44 class SkCanvas;
45 class SkColorSpace; 46 class SkColorSpace;
46 class SkImage; 47 class SkImage;
47 struct SkImageInfo; 48 struct SkImageInfo;
48 class SkPicture;
49 49
50 namespace blink { 50 namespace blink {
51 51
52 class ImageBuffer; 52 class ImageBuffer;
53 class WebLayer; 53 class WebLayer;
54 class FloatRect; 54 class FloatRect;
55 class GraphicsContext; 55 class GraphicsContext;
56 56
57 class PLATFORM_EXPORT ImageBufferSurface { 57 class PLATFORM_EXPORT ImageBufferSurface {
58 WTF_MAKE_NONCOPYABLE(ImageBufferSurface); 58 WTF_MAKE_NONCOPYABLE(ImageBufferSurface);
59 USING_FAST_MALLOC(ImageBufferSurface); 59 USING_FAST_MALLOC(ImageBufferSurface);
60 60
61 public: 61 public:
62 virtual ~ImageBufferSurface(); 62 virtual ~ImageBufferSurface();
63 63
64 virtual SkCanvas* canvas() = 0; 64 virtual PaintCanvas* canvas() = 0;
65 virtual void disableDeferral(DisableDeferralReason) {} 65 virtual void disableDeferral(DisableDeferralReason) {}
66 virtual void willOverwriteCanvas() {} 66 virtual void willOverwriteCanvas() {}
67 virtual void didDraw(const FloatRect& rect) {} 67 virtual void didDraw(const FloatRect& rect) {}
68 virtual bool isValid() const = 0; 68 virtual bool isValid() const = 0;
69 virtual bool restore() { return false; } 69 virtual bool restore() { return false; }
70 virtual WebLayer* layer() const { return 0; } 70 virtual WebLayer* layer() const { return 0; }
71 virtual bool isAccelerated() const { return false; } 71 virtual bool isAccelerated() const { return false; }
72 virtual bool isRecording() const { return false; } 72 virtual bool isRecording() const { return false; }
73 virtual bool isExpensiveToPaint() { return false; } 73 virtual bool isExpensiveToPaint() { return false; }
74 virtual void setFilterQuality(SkFilterQuality) {} 74 virtual void setFilterQuality(SkFilterQuality) {}
75 virtual void setIsHidden(bool) {} 75 virtual void setIsHidden(bool) {}
76 virtual void setImageBuffer(ImageBuffer*) {} 76 virtual void setImageBuffer(ImageBuffer*) {}
77 virtual sk_sp<SkPicture> getPicture(); 77 virtual sk_sp<PaintRecord> getPicture();
78 virtual void finalizeFrame(const FloatRect& dirtyRect) {} 78 virtual void finalizeFrame(const FloatRect& dirtyRect) {}
79 virtual void draw(GraphicsContext&, 79 virtual void draw(GraphicsContext&,
80 const FloatRect& destRect, 80 const FloatRect& destRect,
81 const FloatRect& srcRect, 81 const FloatRect& srcRect,
82 SkBlendMode); 82 SkBlendMode);
83 virtual void setHasExpensiveOp() {} 83 virtual void setHasExpensiveOp() {}
84 virtual GLuint getBackingTextureHandleForOverwrite() { return 0; } 84 virtual GLuint getBackingTextureHandleForOverwrite() { return 0; }
85 85
86 // Executes all deferred rendering immediately. 86 // Executes all deferred rendering immediately.
87 virtual void flush(FlushReason); 87 virtual void flush(FlushReason);
(...skipping 29 matching lines...) Expand all
117 private: 117 private:
118 OpacityMode m_opacityMode; 118 OpacityMode m_opacityMode;
119 IntSize m_size; 119 IntSize m_size;
120 sk_sp<SkColorSpace> m_colorSpace; 120 sk_sp<SkColorSpace> m_colorSpace;
121 SkColorType m_colorType; 121 SkColorType m_colorType;
122 }; 122 };
123 123
124 } // namespace blink 124 } // namespace blink
125 125
126 #endif 126 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698