OLD | NEW |
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 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
997 void GraphicsLayer::SetIsRootForIsolatedGroup(bool isolated) { | 997 void GraphicsLayer::SetIsRootForIsolatedGroup(bool isolated) { |
998 if (is_root_for_isolated_group_ == isolated) | 998 if (is_root_for_isolated_group_ == isolated) |
999 return; | 999 return; |
1000 is_root_for_isolated_group_ = isolated; | 1000 is_root_for_isolated_group_ = isolated; |
1001 PlatformLayer()->SetIsRootForIsolatedGroup(isolated); | 1001 PlatformLayer()->SetIsRootForIsolatedGroup(isolated); |
1002 } | 1002 } |
1003 | 1003 |
1004 void GraphicsLayer::SetContentsNeedsDisplay() { | 1004 void GraphicsLayer::SetContentsNeedsDisplay() { |
1005 if (WebLayer* contents_layer = ContentsLayerIfRegistered()) { | 1005 if (WebLayer* contents_layer = ContentsLayerIfRegistered()) { |
1006 contents_layer->Invalidate(); | 1006 contents_layer->Invalidate(); |
1007 TrackRasterInvalidation(*this, contents_rect_, kPaintInvalidationFull); | 1007 TrackRasterInvalidation(*this, contents_rect_, |
| 1008 PaintInvalidationReason::kFull); |
1008 } | 1009 } |
1009 } | 1010 } |
1010 | 1011 |
1011 void GraphicsLayer::SetNeedsDisplay() { | 1012 void GraphicsLayer::SetNeedsDisplay() { |
1012 if (!DrawsContent()) | 1013 if (!DrawsContent()) |
1013 return; | 1014 return; |
1014 | 1015 |
1015 // TODO(chrishtr): Stop invalidating the rects once | 1016 // TODO(chrishtr): Stop invalidating the rects once |
1016 // FrameView::paintRecursively() does so. | 1017 // FrameView::paintRecursively() does so. |
1017 layer_->Layer()->Invalidate(); | 1018 layer_->Layer()->Invalidate(); |
1018 for (size_t i = 0; i < link_highlights_.size(); ++i) | 1019 for (size_t i = 0; i < link_highlights_.size(); ++i) |
1019 link_highlights_[i]->Invalidate(); | 1020 link_highlights_[i]->Invalidate(); |
1020 GetPaintController().InvalidateAll(); | 1021 GetPaintController().InvalidateAll(); |
1021 | 1022 |
1022 TrackRasterInvalidation(*this, IntRect(IntPoint(), ExpandedIntSize(size_)), | 1023 TrackRasterInvalidation(*this, IntRect(IntPoint(), ExpandedIntSize(size_)), |
1023 kPaintInvalidationFull); | 1024 PaintInvalidationReason::kFull); |
1024 } | 1025 } |
1025 | 1026 |
1026 DISABLE_CFI_PERF | 1027 DISABLE_CFI_PERF |
1027 void GraphicsLayer::SetNeedsDisplayInRect( | 1028 void GraphicsLayer::SetNeedsDisplayInRect( |
1028 const IntRect& rect, | 1029 const IntRect& rect, |
1029 PaintInvalidationReason invalidation_reason, | 1030 PaintInvalidationReason invalidation_reason, |
1030 const DisplayItemClient& client) { | 1031 const DisplayItemClient& client) { |
1031 if (!DrawsContent()) | 1032 if (!DrawsContent()) |
1032 return; | 1033 return; |
1033 | 1034 |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1291 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) { | 1292 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) { |
1292 if (!layer) { | 1293 if (!layer) { |
1293 LOG(INFO) << "Cannot showGraphicsLayerTree for (nil)."; | 1294 LOG(INFO) << "Cannot showGraphicsLayerTree for (nil)."; |
1294 return; | 1295 return; |
1295 } | 1296 } |
1296 | 1297 |
1297 String output = layer->LayerTreeAsText(blink::kLayerTreeIncludesDebugInfo); | 1298 String output = layer->LayerTreeAsText(blink::kLayerTreeIncludesDebugInfo); |
1298 LOG(INFO) << output.Utf8().data(); | 1299 LOG(INFO) << output.Utf8().data(); |
1299 } | 1300 } |
1300 #endif | 1301 #endif |
OLD | NEW |