OLD | NEW |
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 { | 68 { |
69 IntRect interestRect = m_graphicsLayer->interestRect(); | 69 IntRect interestRect = m_graphicsLayer->interestRect(); |
70 return gfx::Rect(interestRect.x(), interestRect.y(), interestRect.width(), i
nterestRect.height()); | 70 return gfx::Rect(interestRect.x(), interestRect.y(), interestRect.width(), i
nterestRect.height()); |
71 } | 71 } |
72 | 72 |
73 void ContentLayerDelegate::paintContents( | 73 void ContentLayerDelegate::paintContents( |
74 WebDisplayItemList* webDisplayItemList, WebContentLayerClient::PaintingContr
olSetting paintingControl) | 74 WebDisplayItemList* webDisplayItemList, WebContentLayerClient::PaintingContr
olSetting paintingControl) |
75 { | 75 { |
76 TRACE_EVENT0("blink,benchmark", "ContentLayerDelegate::paintContents"); | 76 TRACE_EVENT0("blink,benchmark", "ContentLayerDelegate::paintContents"); |
77 | 77 |
78 PaintController& paintController = m_graphicsLayer->paintController(); | 78 PaintController& paintController = m_graphicsLayer->getPaintController(); |
79 paintController.setDisplayItemConstructionIsDisabled( | 79 paintController.setDisplayItemConstructionIsDisabled( |
80 paintingControl == WebContentLayerClient::DisplayListConstructionDisable
d); | 80 paintingControl == WebContentLayerClient::DisplayListConstructionDisable
d); |
81 paintController.setSubsequenceCachingIsDisabled( | 81 paintController.setSubsequenceCachingIsDisabled( |
82 paintingControl == WebContentLayerClient::SubsequenceCachingDisabled); | 82 paintingControl == WebContentLayerClient::SubsequenceCachingDisabled); |
83 | 83 |
84 // We also disable caching when Painting or Construction are disabled. In bo
th cases we would like | 84 // We also disable caching when Painting or Construction are disabled. In bo
th cases we would like |
85 // to compare assuming the full cost of recording, not the cost of re-using
cached content. | 85 // to compare assuming the full cost of recording, not the cost of re-using
cached content. |
86 if (paintingControl != WebContentLayerClient::PaintDefaultBehavior | 86 if (paintingControl != WebContentLayerClient::PaintDefaultBehavior |
87 && paintingControl != WebContentLayerClient::PaintDefaultBehaviorForTest | 87 && paintingControl != WebContentLayerClient::PaintDefaultBehaviorForTest |
88 && paintingControl != WebContentLayerClient::SubsequenceCachingDisabled) | 88 && paintingControl != WebContentLayerClient::SubsequenceCachingDisabled) |
(...skipping 11 matching lines...) Expand all Loading... |
100 m_graphicsLayer->paint(nullptr, disabledMode); | 100 m_graphicsLayer->paint(nullptr, disabledMode); |
101 | 101 |
102 paintArtifactToWebDisplayItemList(webDisplayItemList, paintController.paintA
rtifact(), paintableRegion()); | 102 paintArtifactToWebDisplayItemList(webDisplayItemList, paintController.paintA
rtifact(), paintableRegion()); |
103 | 103 |
104 paintController.setDisplayItemConstructionIsDisabled(false); | 104 paintController.setDisplayItemConstructionIsDisabled(false); |
105 paintController.setSubsequenceCachingIsDisabled(false); | 105 paintController.setSubsequenceCachingIsDisabled(false); |
106 } | 106 } |
107 | 107 |
108 size_t ContentLayerDelegate::approximateUnsharedMemoryUsage() const | 108 size_t ContentLayerDelegate::approximateUnsharedMemoryUsage() const |
109 { | 109 { |
110 return m_graphicsLayer->paintController().approximateUnsharedMemoryUsage(); | 110 return m_graphicsLayer->getPaintController().approximateUnsharedMemoryUsage(
); |
111 } | 111 } |
112 | 112 |
113 } // namespace blink | 113 } // namespace blink |
OLD | NEW |