| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 // to compare assuming the full cost of recording, not the cost of re-using
cached content. | 86 // to compare assuming the full cost of recording, not the cost of re-using
cached content. |
| 87 if (paintingControl != WebContentLayerClient::PaintDefaultBehavior | 87 if (paintingControl != WebContentLayerClient::PaintDefaultBehavior |
| 88 && paintingControl != WebContentLayerClient::SubsequenceCachingDisabled) | 88 && paintingControl != WebContentLayerClient::SubsequenceCachingDisabled) |
| 89 paintController.invalidateAll(); | 89 paintController.invalidateAll(); |
| 90 | 90 |
| 91 GraphicsContext::DisabledMode disabledMode = GraphicsContext::NothingDisable
d; | 91 GraphicsContext::DisabledMode disabledMode = GraphicsContext::NothingDisable
d; |
| 92 if (paintingControl == WebContentLayerClient::DisplayListPaintingDisabled | 92 if (paintingControl == WebContentLayerClient::DisplayListPaintingDisabled |
| 93 || paintingControl == WebContentLayerClient::DisplayListConstructionDisa
bled) | 93 || paintingControl == WebContentLayerClient::DisplayListConstructionDisa
bled) |
| 94 disabledMode = GraphicsContext::FullyDisabled; | 94 disabledMode = GraphicsContext::FullyDisabled; |
| 95 | 95 |
| 96 m_graphicsLayer->paint(nullptr, disabledMode); | 96 // Anything other than PaintDefaultBehavior is for testing. In non-testing s
cenarios, |
| 97 // it is an error to call GraphicsLayer::paint. Actual painting occurs in Fr
ameView::synchronizedPaint; |
| 98 // this method merely copies the painted output to the WebDisplayItemList. |
| 99 if (paintingControl != PaintDefaultBehavior) |
| 100 m_graphicsLayer->paint(nullptr, disabledMode); |
| 101 |
| 97 paintArtifactToWebDisplayItemList(webDisplayItemList, m_graphicsLayer, paint
Controller.paintArtifact(), paintableRegion()); | 102 paintArtifactToWebDisplayItemList(webDisplayItemList, m_graphicsLayer, paint
Controller.paintArtifact(), paintableRegion()); |
| 103 |
| 98 paintController.setDisplayItemConstructionIsDisabled(false); | 104 paintController.setDisplayItemConstructionIsDisabled(false); |
| 99 paintController.setSubsequenceCachingIsDisabled(false); | 105 paintController.setSubsequenceCachingIsDisabled(false); |
| 100 } | 106 } |
| 101 | 107 |
| 102 size_t ContentLayerDelegate::approximateUnsharedMemoryUsage() const | 108 size_t ContentLayerDelegate::approximateUnsharedMemoryUsage() const |
| 103 { | 109 { |
| 104 return m_graphicsLayer->paintController().approximateUnsharedMemoryUsage(); | 110 return m_graphicsLayer->paintController().approximateUnsharedMemoryUsage(); |
| 105 } | 111 } |
| 106 | 112 |
| 107 } // namespace blink | 113 } // namespace blink |
| OLD | NEW |