OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 const LayoutRect& paintInvalidationRect() const { return m_paintInvalidation
Rect; } | 64 const LayoutRect& paintInvalidationRect() const { return m_paintInvalidation
Rect; } |
65 private: | 65 private: |
66 GraphicsContext* m_savedGraphicsContext; | 66 GraphicsContext* m_savedGraphicsContext; |
67 RenderLayer* m_renderLayer; | 67 RenderLayer* m_renderLayer; |
68 | 68 |
69 LayoutRect m_paintInvalidationRect; | 69 LayoutRect m_paintInvalidationRect; |
70 FloatRect m_filterBoxRect; | 70 FloatRect m_filterBoxRect; |
71 bool m_haveFilterEffect; | 71 bool m_haveFilterEffect; |
72 }; | 72 }; |
73 | 73 |
74 class FilterEffectRenderer FINAL : public Filter | 74 class FilterEffectRenderer final : public Filter |
75 { | 75 { |
76 WTF_MAKE_FAST_ALLOCATED; | 76 WTF_MAKE_FAST_ALLOCATED; |
77 public: | 77 public: |
78 static PassRefPtr<FilterEffectRenderer> create() | 78 static PassRefPtr<FilterEffectRenderer> create() |
79 { | 79 { |
80 return adoptRef(new FilterEffectRenderer()); | 80 return adoptRef(new FilterEffectRenderer()); |
81 } | 81 } |
82 | 82 |
83 void setSourceImageRect(const IntRect& sourceImageRect) | 83 void setSourceImageRect(const IntRect& sourceImageRect) |
84 { | 84 { |
85 m_sourceDrawingRegion = sourceImageRect; | 85 m_sourceDrawingRegion = sourceImageRect; |
86 m_graphicsBufferAttached = false; | 86 m_graphicsBufferAttached = false; |
87 } | 87 } |
88 virtual IntRect sourceImageRect() const OVERRIDE { return m_sourceDrawingReg
ion; } | 88 virtual IntRect sourceImageRect() const override { return m_sourceDrawingReg
ion; } |
89 | 89 |
90 GraphicsContext* inputContext(); | 90 GraphicsContext* inputContext(); |
91 ImageBuffer* output() const { return lastEffect()->asImageBuffer(); } | 91 ImageBuffer* output() const { return lastEffect()->asImageBuffer(); } |
92 | 92 |
93 bool build(RenderObject* renderer, const FilterOperations&); | 93 bool build(RenderObject* renderer, const FilterOperations&); |
94 bool updateBackingStoreRect(const FloatRect& filterRect); | 94 bool updateBackingStoreRect(const FloatRect& filterRect); |
95 void allocateBackingStoreIfNeeded(); | 95 void allocateBackingStoreIfNeeded(); |
96 void clearIntermediateResults(); | 96 void clearIntermediateResults(); |
97 void apply(); | 97 void apply(); |
98 | 98 |
(...skipping 17 matching lines...) Expand all Loading... |
116 RefPtr<FilterEffect> m_lastEffect; | 116 RefPtr<FilterEffect> m_lastEffect; |
117 | 117 |
118 bool m_graphicsBufferAttached; | 118 bool m_graphicsBufferAttached; |
119 bool m_hasFilterThatMovesPixels; | 119 bool m_hasFilterThatMovesPixels; |
120 }; | 120 }; |
121 | 121 |
122 } // namespace blink | 122 } // namespace blink |
123 | 123 |
124 | 124 |
125 #endif // FilterEffectRenderer_h | 125 #endif // FilterEffectRenderer_h |
OLD | NEW |