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

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

Issue 1393083003: Implement interest rects for synchronized paint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 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 24 matching lines...) Expand all
35 35
36 namespace blink { 36 namespace blink {
37 37
38 class DisplayItemList; 38 class DisplayItemList;
39 class GraphicsContext; 39 class GraphicsContext;
40 class IntRect; 40 class IntRect;
41 41
42 class PLATFORM_EXPORT GraphicsContextPainter { 42 class PLATFORM_EXPORT GraphicsContextPainter {
43 public: 43 public:
44 virtual void paint(GraphicsContext&, const IntRect& clip) = 0; 44 virtual void paint(GraphicsContext&, const IntRect& clip) = 0;
45 // Paints the content if required, either because the content changed or its interest rect has too much unpainted area.
46 virtual void paintIfNeeded(GraphicsContext&) = 0;
45 virtual DisplayItemList* displayItemList() = 0; 47 virtual DisplayItemList* displayItemList() = 0;
46 48
47 protected: 49 protected:
48 virtual ~GraphicsContextPainter() { } 50 virtual ~GraphicsContextPainter() { }
49 }; 51 };
50 52
51 class PLATFORM_EXPORT ContentLayerDelegate : public WebContentLayerClient { 53 class PLATFORM_EXPORT ContentLayerDelegate : public WebContentLayerClient {
52 WTF_MAKE_NONCOPYABLE(ContentLayerDelegate); 54 WTF_MAKE_NONCOPYABLE(ContentLayerDelegate);
53 55
54 public: 56 public:
55 explicit ContentLayerDelegate(GraphicsContextPainter*); 57 explicit ContentLayerDelegate(GraphicsContextPainter*);
56 ~ContentLayerDelegate() override; 58 ~ContentLayerDelegate() override;
57 59
58 // WebContentLayerClient implementation. 60 // WebContentLayerClient implementation.
59 void paintContents(SkCanvas*, const WebRect& clip, WebContentLayerClient::Pa intingControlSetting = PaintDefaultBehavior) override; 61 void paintContents(SkCanvas*, const WebRect& clip, WebContentLayerClient::Pa intingControlSetting = PaintDefaultBehavior) override;
60 void paintContents(WebDisplayItemList*, const WebRect& clip, WebContentLayer Client::PaintingControlSetting = PaintDefaultBehavior) override; 62 void paintContents(WebDisplayItemList*, const WebRect& clip, WebContentLayer Client::PaintingControlSetting = PaintDefaultBehavior) override;
61 size_t approximateUnsharedMemoryUsage() const override; 63 size_t approximateUnsharedMemoryUsage() const override;
62 64
63 private: 65 private:
64 GraphicsContextPainter* m_painter; 66 GraphicsContextPainter* m_painter;
65 }; 67 };
66 68
67 } // namespace blink 69 } // namespace blink
68 70
69 #endif // ContentLayerDelegate_h 71 #endif // ContentLayerDelegate_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/geometry/IntRect.h ('k') | third_party/WebKit/Source/platform/graphics/GraphicsLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698