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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // to compare assuming the full cost of recording, not the cost of re-using
cached content. | 103 // to compare assuming the full cost of recording, not the cost of re-using
cached content. |
104 if (paintingControl != WebContentLayerClient::PaintDefaultBehavior) | 104 if (paintingControl != WebContentLayerClient::PaintDefaultBehavior) |
105 paintController->invalidateAll(); | 105 paintController->invalidateAll(); |
106 | 106 |
107 GraphicsContext::DisabledMode disabledMode = GraphicsContext::NothingDisable
d; | 107 GraphicsContext::DisabledMode disabledMode = GraphicsContext::NothingDisable
d; |
108 if (paintingControl == WebContentLayerClient::DisplayListPaintingDisabled | 108 if (paintingControl == WebContentLayerClient::DisplayListPaintingDisabled |
109 || paintingControl == WebContentLayerClient::DisplayListConstructionDisa
bled) | 109 || paintingControl == WebContentLayerClient::DisplayListConstructionDisa
bled) |
110 disabledMode = GraphicsContext::FullyDisabled; | 110 disabledMode = GraphicsContext::FullyDisabled; |
111 GraphicsContext context(*paintController, disabledMode); | 111 GraphicsContext context(*paintController, disabledMode); |
112 | 112 |
113 m_painter->paint(context, clip); | 113 IntRect interestRect = clip; |
| 114 m_painter->paint(context, &interestRect); |
114 | 115 |
115 paintController->commitNewDisplayItems(); | 116 paintController->commitNewDisplayItems(); |
116 paintArtifactToWebDisplayItemList(webDisplayItemList, paintController->paint
Artifact(), clip); | 117 paintArtifactToWebDisplayItemList(webDisplayItemList, paintController->paint
Artifact(), clip); |
117 } | 118 } |
118 | 119 |
119 size_t ContentLayerDelegate::approximateUnsharedMemoryUsage() const | 120 size_t ContentLayerDelegate::approximateUnsharedMemoryUsage() const |
120 { | 121 { |
121 return m_painter->paintController()->approximateUnsharedMemoryUsage(); | 122 return m_painter->paintController()->approximateUnsharedMemoryUsage(); |
122 } | 123 } |
123 | 124 |
124 } // namespace blink | 125 } // namespace blink |
OLD | NEW |