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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.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) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. 3 * Copyright (C) 2013 Intel Corporation. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 void setScrollableArea(ScrollableArea*, bool isViewport); 239 void setScrollableArea(ScrollableArea*, bool isViewport);
240 ScrollableArea* scrollableArea() const { return m_scrollableArea; } 240 ScrollableArea* scrollableArea() const { return m_scrollableArea; }
241 241
242 WebContentLayer* contentLayer() const { return m_layer.get(); } 242 WebContentLayer* contentLayer() const { return m_layer.get(); }
243 243
244 static void registerContentsLayer(WebLayer*); 244 static void registerContentsLayer(WebLayer*);
245 static void unregisterContentsLayer(WebLayer*); 245 static void unregisterContentsLayer(WebLayer*);
246 246
247 // GraphicsContextPainter implementation. 247 // GraphicsContextPainter implementation.
248 void paint(GraphicsContext&, const IntRect& clip) override; 248 void paint(GraphicsContext&, const IntRect& clip) override;
249 void paintIfNeeded(GraphicsContext&) override;
249 250
250 // WebCompositorAnimationDelegate implementation. 251 // WebCompositorAnimationDelegate implementation.
251 void notifyAnimationStarted(double monotonicTime, int group) override; 252 void notifyAnimationStarted(double monotonicTime, int group) override;
252 void notifyAnimationFinished(double monotonicTime, int group) override; 253 void notifyAnimationFinished(double monotonicTime, int group) override;
253 254
254 // WebLayerScrollClient implementation. 255 // WebLayerScrollClient implementation.
255 void didScroll() override; 256 void didScroll() override;
256 257
257 DisplayItemList* displayItemList() override; 258 DisplayItemList* displayItemList() override;
258 259
(...skipping 11 matching lines...) Expand all
270 protected: 271 protected:
271 String debugName(WebLayer*) const; 272 String debugName(WebLayer*) const;
272 273
273 explicit GraphicsLayer(GraphicsLayerClient*); 274 explicit GraphicsLayer(GraphicsLayerClient*);
274 // GraphicsLayerFactoryChromium that wants to create a GraphicsLayer need to be friends. 275 // GraphicsLayerFactoryChromium that wants to create a GraphicsLayer need to be friends.
275 friend class GraphicsLayerFactoryChromium; 276 friend class GraphicsLayerFactoryChromium;
276 // for testing 277 // for testing
277 friend class FakeGraphicsLayerFactory; 278 friend class FakeGraphicsLayerFactory;
278 279
279 private: 280 private:
280 // Callback from the underlying graphics system to draw layer contents.
281 void paintGraphicsLayerContents(GraphicsContext&, const IntRect& clip);
282
283 // Sets m_needsDisplay, but without invalidating the DisplayItemList. This a llows us to test 281 // Sets m_needsDisplay, but without invalidating the DisplayItemList. This a llows us to test
284 // scenarios where paint needs to be re-calculated, but no DisplayItemClient s were invalidated 282 // scenarios where paint needs to be re-calculated, but no DisplayItemClient s were invalidated
285 // (such as re-paints due to change of interest rect). 283 // (such as re-paints due to change of interest rect).
286 void setNeedsDisplayWithoutInvalidateForTesting(); 284 void setNeedsDisplayWithoutInvalidateForTesting();
287 285
288 // Adds a child without calling updateChildList(), so that adding children 286 // Adds a child without calling updateChildList(), so that adding children
289 // can be batched before updating. 287 // can be batched before updating.
290 void addChildInternal(GraphicsLayer*); 288 void addChildInternal(GraphicsLayer*);
291 289
292 #if ENABLE(ASSERT) 290 #if ENABLE(ASSERT)
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 }; 381 };
384 382
385 } // namespace blink 383 } // namespace blink
386 384
387 #ifndef NDEBUG 385 #ifndef NDEBUG
388 // Outside the blink namespace for ease of invocation from gdb. 386 // Outside the blink namespace for ease of invocation from gdb.
389 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); 387 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*);
390 #endif 388 #endif
391 389
392 #endif // GraphicsLayer_h 390 #endif // GraphicsLayer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698