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

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

Issue 1441973003: Use recomputed interest rect only if it changed enough (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 239
240 void setScrollableArea(ScrollableArea*, bool isViewport); 240 void setScrollableArea(ScrollableArea*, bool isViewport);
241 ScrollableArea* scrollableArea() const { return m_scrollableArea; } 241 ScrollableArea* scrollableArea() const { return m_scrollableArea; }
242 242
243 WebContentLayer* contentLayer() const { return m_layer.get(); } 243 WebContentLayer* contentLayer() const { return m_layer.get(); }
244 244
245 static void registerContentsLayer(WebLayer*); 245 static void registerContentsLayer(WebLayer*);
246 static void unregisterContentsLayer(WebLayer*); 246 static void unregisterContentsLayer(WebLayer*);
247 247
248 // GraphicsContextPainter implementation. 248 // GraphicsContextPainter implementation.
249 void paint(GraphicsContext&, const IntRect* clip) override; 249 void paint(GraphicsContext&, const IntRect* interestRect) override;
250 250
251 // WebCompositorAnimationDelegate implementation. 251 // WebCompositorAnimationDelegate implementation.
252 void notifyAnimationStarted(double monotonicTime, int group) override; 252 void notifyAnimationStarted(double monotonicTime, int group) override;
253 void notifyAnimationFinished(double monotonicTime, int group) override; 253 void notifyAnimationFinished(double monotonicTime, int group) override;
254 254
255 // WebLayerScrollClient implementation. 255 // WebLayerScrollClient implementation.
256 void didScroll() override; 256 void didScroll() override;
257 257
258 PaintController* paintController() override; 258 PaintController* paintController() override;
259 259
260 // Exposed for tests. 260 // Exposed for tests.
261 WebLayer* contentsLayer() const { return m_contentsLayer; } 261 WebLayer* contentsLayer() const { return m_contentsLayer; }
262 262
263 static void setDrawDebugRedFillForTesting(bool); 263 static void setDrawDebugRedFillForTesting(bool);
264 ContentLayerDelegate* contentLayerDelegateForTesting() const { return m_cont entLayerDelegate.get(); } 264 ContentLayerDelegate* contentLayerDelegateForTesting() const { return m_cont entLayerDelegate.get(); }
265 265
266 #ifndef NDEBUG 266 #ifndef NDEBUG
267 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi s); } 267 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi s); }
268 String debugName() const { return m_client->debugName(this) + " debug red fi ll"; } 268 String debugName() const { return m_client->debugName(this) + " debug red fi ll"; }
269 #endif 269 #endif
270 270
271 IntRect previousInterestRect() const { return m_previousInterestRect; }
272
271 protected: 273 protected:
272 String debugName(WebLayer*) const; 274 String debugName(WebLayer*) const;
273 275
274 explicit GraphicsLayer(GraphicsLayerClient*); 276 explicit GraphicsLayer(GraphicsLayerClient*);
275 // GraphicsLayerFactoryChromium that wants to create a GraphicsLayer need to be friends. 277 // GraphicsLayerFactoryChromium that wants to create a GraphicsLayer need to be friends.
276 friend class GraphicsLayerFactoryChromium; 278 friend class GraphicsLayerFactoryChromium;
277 // for testing 279 // for testing
278 friend class FakeGraphicsLayerFactory; 280 friend class FakeGraphicsLayerFactory;
279 281
280 private: 282 private:
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 Vector<LinkHighlight*> m_linkHighlights; 369 Vector<LinkHighlight*> m_linkHighlights;
368 370
369 OwnPtr<ContentLayerDelegate> m_contentLayerDelegate; 371 OwnPtr<ContentLayerDelegate> m_contentLayerDelegate;
370 372
371 GC_PLUGIN_IGNORE("509911") 373 GC_PLUGIN_IGNORE("509911")
372 ScrollableArea* m_scrollableArea; 374 ScrollableArea* m_scrollableArea;
373 GraphicsLayerDebugInfo m_debugInfo; 375 GraphicsLayerDebugInfo m_debugInfo;
374 int m_3dRenderingContext; 376 int m_3dRenderingContext;
375 377
376 OwnPtr<PaintController> m_paintController; 378 OwnPtr<PaintController> m_paintController;
379
380 IntRect m_previousInterestRect;
377 }; 381 };
378 382
379 } // namespace blink 383 } // namespace blink
380 384
381 #ifndef NDEBUG 385 #ifndef NDEBUG
382 // Outside the blink namespace for ease of invocation from gdb. 386 // Outside the blink namespace for ease of invocation from gdb.
383 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); 387 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*);
384 #endif 388 #endif
385 389
386 #endif // GraphicsLayer_h 390 #endif // GraphicsLayer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698