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

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

Issue 763493003: Track scissored damage area for WebGL Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 | « Source/platform/graphics/GraphicsLayer.h ('k') | Source/platform/scroll/ScrollableArea.cpp » ('j') | 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 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 } 883 }
884 884
885 void GraphicsLayer::setIsRootForIsolatedGroup(bool isolated) 885 void GraphicsLayer::setIsRootForIsolatedGroup(bool isolated)
886 { 886 {
887 if (m_isRootForIsolatedGroup == isolated) 887 if (m_isRootForIsolatedGroup == isolated)
888 return; 888 return;
889 m_isRootForIsolatedGroup = isolated; 889 m_isRootForIsolatedGroup = isolated;
890 platformLayer()->setIsRootForIsolatedGroup(isolated); 890 platformLayer()->setIsRootForIsolatedGroup(isolated);
891 } 891 }
892 892
893 void GraphicsLayer::setContentsNeedsDisplay() 893 void GraphicsLayer::setContentsNeedsDisplay(const IntRect& dirtyRect)
894 { 894 {
895 if (WebLayer* contentsLayer = contentsLayerIfRegistered()) { 895 if (WebLayer* contentsLayer = contentsLayerIfRegistered()) {
896 contentsLayer->invalidate(); 896 IntRect rect = m_contentsRect;
897 addRepaintRect(m_contentsRect); 897 if (!dirtyRect.isEmpty())
898 rect = dirtyRect;
899 contentsLayer->invalidateRect(rect);
900 addRepaintRect(rect);
898 } 901 }
899 } 902 }
900 903
901 void GraphicsLayer::setNeedsDisplay() 904 void GraphicsLayer::setNeedsDisplay()
902 { 905 {
903 if (drawsContent()) { 906 if (drawsContent()) {
904 m_layer->layer()->invalidate(); 907 m_layer->layer()->invalidate();
905 addRepaintRect(FloatRect(FloatPoint(), m_size)); 908 addRepaintRect(FloatRect(FloatPoint(), m_size));
906 for (size_t i = 0; i < m_linkHighlights.size(); ++i) 909 for (size_t i = 0; i < m_linkHighlights.size(); ++i)
907 m_linkHighlights[i]->invalidate(); 910 m_linkHighlights[i]->invalidate();
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 #ifndef NDEBUG 1088 #ifndef NDEBUG
1086 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) 1089 void showGraphicsLayerTree(const blink::GraphicsLayer* layer)
1087 { 1090 {
1088 if (!layer) 1091 if (!layer)
1089 return; 1092 return;
1090 1093
1091 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); 1094 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo);
1092 fprintf(stderr, "%s\n", output.utf8().data()); 1095 fprintf(stderr, "%s\n", output.utf8().data());
1093 } 1096 }
1094 #endif 1097 #endif
OLDNEW
« no previous file with comments | « Source/platform/graphics/GraphicsLayer.h ('k') | Source/platform/scroll/ScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698