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

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

Issue 646133002: Don't convert invalidations to a FloatRect. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: invalidationint: . Created 6 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 | Annotate | Revision Log
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 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 void GraphicsLayer::setNeedsDisplay() 891 void GraphicsLayer::setNeedsDisplay()
892 { 892 {
893 if (drawsContent()) { 893 if (drawsContent()) {
894 m_layer->layer()->invalidate(); 894 m_layer->layer()->invalidate();
895 addRepaintRect(FloatRect(FloatPoint(), m_size)); 895 addRepaintRect(FloatRect(FloatPoint(), m_size));
896 for (size_t i = 0; i < m_linkHighlights.size(); ++i) 896 for (size_t i = 0; i < m_linkHighlights.size(); ++i)
897 m_linkHighlights[i]->invalidate(); 897 m_linkHighlights[i]->invalidate();
898 } 898 }
899 } 899 }
900 900
901 void GraphicsLayer::setNeedsDisplayInRect(const FloatRect& rect, PaintInvalidati onReason invalidationReason) 901 void GraphicsLayer::setNeedsDisplayInRect(const IntRect& rect, PaintInvalidation Reason invalidationReason)
902 { 902 {
903 if (drawsContent()) { 903 if (drawsContent()) {
904 m_layer->layer()->invalidateRect(rect); 904 m_layer->layer()->invalidateRect(rect);
905 if (firstPaintInvalidationTrackingEnabled()) 905 if (firstPaintInvalidationTrackingEnabled())
906 m_debugInfo.appendAnnotatedInvalidateRect(rect, invalidationReason); 906 m_debugInfo.appendAnnotatedInvalidateRect(rect, invalidationReason);
907 addRepaintRect(rect); 907 addRepaintRect(rect);
908 for (size_t i = 0; i < m_linkHighlights.size(); ++i) 908 for (size_t i = 0; i < m_linkHighlights.size(); ++i)
909 m_linkHighlights[i]->invalidate(); 909 m_linkHighlights[i]->invalidate();
910 } 910 }
911 } 911 }
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 #ifndef NDEBUG 1068 #ifndef NDEBUG
1069 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) 1069 void showGraphicsLayerTree(const blink::GraphicsLayer* layer)
1070 { 1070 {
1071 if (!layer) 1071 if (!layer)
1072 return; 1072 return;
1073 1073
1074 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); 1074 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo);
1075 fprintf(stderr, "%s\n", output.utf8().data()); 1075 fprintf(stderr, "%s\n", output.utf8().data());
1076 } 1076 }
1077 #endif 1077 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698