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

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

Issue 1469123005: Always use own PaintController in GraphicsLayer::paint() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 { 299 {
300 if (!RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()) 300 if (!RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled())
301 m_previousInterestRect = m_client->computeInterestRect(this, m_previousI nterestRect); 301 m_previousInterestRect = m_client->computeInterestRect(this, m_previousI nterestRect);
302 return m_previousInterestRect; 302 return m_previousInterestRect;
303 } 303 }
304 304
305 void GraphicsLayer::paint(GraphicsContext& context, const IntRect* interestRect) 305 void GraphicsLayer::paint(GraphicsContext& context, const IntRect* interestRect)
306 { 306 {
307 ASSERT(interestRect || RuntimeEnabledFeatures::slimmingPaintSynchronizedPain tingEnabled()); 307 ASSERT(interestRect || RuntimeEnabledFeatures::slimmingPaintSynchronizedPain tingEnabled());
308 ASSERT(drawsContent()); 308 ASSERT(drawsContent());
309 ASSERT(&context.paintController() == m_paintController);
309 310
310 if (!m_client) 311 if (!m_client)
311 return; 312 return;
312 if (firstPaintInvalidationTrackingEnabled()) 313 if (firstPaintInvalidationTrackingEnabled())
313 m_debugInfo.clearAnnotatedInvalidateRects(); 314 m_debugInfo.clearAnnotatedInvalidateRects();
314 incrementPaintCount(); 315 incrementPaintCount();
315 #ifndef NDEBUG 316 #ifndef NDEBUG
316 if (m_paintController && contentsOpaque() && s_drawDebugRedFill) { 317 if (contentsOpaque() && s_drawDebugRedFill) {
317 FloatRect rect(FloatPoint(), size()); 318 FloatRect rect(FloatPoint(), size());
318 if (!DrawingRecorder::useCachedDrawingIfPossible(context, *this, Display Item::DebugRedFill)) { 319 if (!DrawingRecorder::useCachedDrawingIfPossible(context, *this, Display Item::DebugRedFill)) {
319 DrawingRecorder recorder(context, *this, DisplayItem::DebugRedFill, rect); 320 DrawingRecorder recorder(context, *this, DisplayItem::DebugRedFill, rect);
320 context.fillRect(rect, SK_ColorRED); 321 context.fillRect(rect, SK_ColorRED);
321 } 322 }
322 } 323 }
323 #endif 324 #endif
324 325
325 IntRect newInterestRect; 326 IntRect newInterestRect;
326 if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()) { 327 if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()) {
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 { 1221 {
1221 if (!layer) { 1222 if (!layer) {
1222 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); 1223 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n");
1223 return; 1224 return;
1224 } 1225 }
1225 1226
1226 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); 1227 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo);
1227 fprintf(stderr, "%s\n", output.utf8().data()); 1228 fprintf(stderr, "%s\n", output.utf8().data());
1228 } 1229 }
1229 #endif 1230 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698