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

Unified Diff: Source/platform/graphics/ContentLayerDelegate.h

Issue 554183004: Add an alternate paintContents method to WebContentLayerClient. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: opaquerecttracking: . Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/platform/graphics/ContentLayerDelegate.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/ContentLayerDelegate.h
diff --git a/Source/platform/graphics/OpaqueRectTrackingContentLayerDelegate.h b/Source/platform/graphics/ContentLayerDelegate.h
similarity index 71%
rename from Source/platform/graphics/OpaqueRectTrackingContentLayerDelegate.h
rename to Source/platform/graphics/ContentLayerDelegate.h
index f84fadf9ad427edc9eb587a284cbff07b771cebd..bac38847389a89e7104ac7d1ac271f536fe3e919 100644
--- a/Source/platform/graphics/OpaqueRectTrackingContentLayerDelegate.h
+++ b/Source/platform/graphics/ContentLayerDelegate.h
@@ -22,8 +22,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef OpaqueRectTrackingContentLayerDelegate_h
-#define OpaqueRectTrackingContentLayerDelegate_h
+#ifndef ContentLayerDelegate_h
+#define ContentLayerDelegate_h
#include "platform/PlatformExport.h"
#include "public/platform/WebContentLayerClient.h"
@@ -45,19 +45,22 @@ protected:
virtual ~GraphicsContextPainter() { }
};
-class PLATFORM_EXPORT OpaqueRectTrackingContentLayerDelegate : public WebContentLayerClient {
- WTF_MAKE_NONCOPYABLE(OpaqueRectTrackingContentLayerDelegate);
+class PLATFORM_EXPORT ContentLayerDelegate : public WebContentLayerClient {
+ WTF_MAKE_NONCOPYABLE(ContentLayerDelegate);
+
public:
- explicit OpaqueRectTrackingContentLayerDelegate(GraphicsContextPainter*);
- virtual ~OpaqueRectTrackingContentLayerDelegate();
+ explicit ContentLayerDelegate(GraphicsContextPainter*);
+ virtual ~ContentLayerDelegate();
- // If we know that everything that will be painted through this delegate, then we don't bother
- // tracking opaqueness.
- void setOpaque(bool opaque) { m_opaque = opaque; }
+ // When we know everything painted through this delegate will be opaque, allow for optimizations to take place.
+ void setOpaque(bool opaque)
+ {
+ m_opaque = opaque;
+ }
// WebContentLayerClient implementation.
- virtual void paintContents(SkCanvas*, const WebRect& clip, bool canPaintLCDText, WebFloatRect& opaque,
- WebContentLayerClient::GraphicsContextStatus = GraphicsContextEnabled) OVERRIDE;
+ virtual void paintContents(SkCanvas*, const WebRect& clip, bool canPaintLCDText, WebFloatRect& opaque, WebContentLayerClient::GraphicsContextStatus = GraphicsContextEnabled) OVERRIDE;
+ virtual void paintContents(SkCanvas*, const WebRect& clip, bool canPaintLCDText, WebContentLayerClient::GraphicsContextStatus = GraphicsContextEnabled) OVERRIDE;
private:
GraphicsContextPainter* m_painter;
@@ -66,4 +69,4 @@ private:
} // namespace blink
-#endif // OpaqueRectTrackingContentLayerDelegate_h
+#endif // ContentLayerDelegate_h
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/platform/graphics/ContentLayerDelegate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698