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

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

Issue 1428643004: Repaint on interest rect change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@EnableSyncPaint
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) 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // to compare assuming the full cost of recording, not the cost of re-using cached content. 103 // to compare assuming the full cost of recording, not the cost of re-using cached content.
104 if (paintingControl != WebContentLayerClient::PaintDefaultBehavior) 104 if (paintingControl != WebContentLayerClient::PaintDefaultBehavior)
105 paintController->invalidateAll(); 105 paintController->invalidateAll();
106 106
107 GraphicsContext::DisabledMode disabledMode = GraphicsContext::NothingDisable d; 107 GraphicsContext::DisabledMode disabledMode = GraphicsContext::NothingDisable d;
108 if (paintingControl == WebContentLayerClient::DisplayListPaintingDisabled 108 if (paintingControl == WebContentLayerClient::DisplayListPaintingDisabled
109 || paintingControl == WebContentLayerClient::DisplayListConstructionDisa bled) 109 || paintingControl == WebContentLayerClient::DisplayListConstructionDisa bled)
110 disabledMode = GraphicsContext::FullyDisabled; 110 disabledMode = GraphicsContext::FullyDisabled;
111 GraphicsContext context(*paintController, disabledMode); 111 GraphicsContext context(*paintController, disabledMode);
112 112
113 m_painter->paint(context, clip); 113 IntRect interestRect = clip;
114 m_painter->paint(context, &interestRect);
114 115
115 paintController->commitNewDisplayItems(); 116 paintController->commitNewDisplayItems();
116 paintArtifactToWebDisplayItemList(webDisplayItemList, paintController->paint Artifact(), clip); 117 paintArtifactToWebDisplayItemList(webDisplayItemList, paintController->paint Artifact(), clip);
117 } 118 }
118 119
119 size_t ContentLayerDelegate::approximateUnsharedMemoryUsage() const 120 size_t ContentLayerDelegate::approximateUnsharedMemoryUsage() const
120 { 121 {
121 return m_painter->paintController()->approximateUnsharedMemoryUsage(); 122 return m_painter->paintController()->approximateUnsharedMemoryUsage();
122 } 123 }
123 124
124 } // namespace blink 125 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698