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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 paintingControl != WebContentLayerClient::SubsequenceCachingDisabled) | 74 paintingControl != WebContentLayerClient::SubsequenceCachingDisabled) |
75 paintController.invalidateAll(); | 75 paintController.invalidateAll(); |
76 | 76 |
77 GraphicsContext::DisabledMode disabledMode = GraphicsContext::NothingDisabled; | 77 GraphicsContext::DisabledMode disabledMode = GraphicsContext::NothingDisabled; |
78 if (paintingControl == WebContentLayerClient::DisplayListPaintingDisabled || | 78 if (paintingControl == WebContentLayerClient::DisplayListPaintingDisabled || |
79 paintingControl == WebContentLayerClient::DisplayListConstructionDisabled) | 79 paintingControl == WebContentLayerClient::DisplayListConstructionDisabled) |
80 disabledMode = GraphicsContext::FullyDisabled; | 80 disabledMode = GraphicsContext::FullyDisabled; |
81 | 81 |
82 // Anything other than PaintDefaultBehavior is for testing. In non-testing | 82 // Anything other than PaintDefaultBehavior is for testing. In non-testing |
83 // scenarios, it is an error to call GraphicsLayer::paint. Actual painting | 83 // scenarios, it is an error to call GraphicsLayer::paint. Actual painting |
84 // occurs in FrameView::synchronizedPaint; this method merely copies the | 84 // occurs in FrameView::paint(); this method merely copies the painted output |
85 // painted output to the WebDisplayItemList. | 85 // to the WebDisplayItemList. |
86 if (paintingControl != PaintDefaultBehavior) | 86 if (paintingControl != PaintDefaultBehavior) |
87 m_graphicsLayer->paint(nullptr, disabledMode); | 87 m_graphicsLayer->paint(nullptr, disabledMode); |
88 | 88 |
89 paintController.paintArtifact().appendToWebDisplayItemList( | 89 paintController.paintArtifact().appendToWebDisplayItemList( |
90 webDisplayItemList); | 90 webDisplayItemList); |
91 | 91 |
92 if (m_graphicsLayer->colorBehavior().isTransformToTargetColorSpace()) { | 92 if (m_graphicsLayer->colorBehavior().isTransformToTargetColorSpace()) { |
93 webDisplayItemList->setImpliedColorSpace(gfx::ColorSpace::FromSkColorSpace( | 93 webDisplayItemList->setImpliedColorSpace(gfx::ColorSpace::FromSkColorSpace( |
94 m_graphicsLayer->colorBehavior().targetColorSpace())); | 94 m_graphicsLayer->colorBehavior().targetColorSpace())); |
95 } | 95 } |
96 paintController.setDisplayItemConstructionIsDisabled(false); | 96 paintController.setDisplayItemConstructionIsDisabled(false); |
97 paintController.setSubsequenceCachingIsDisabled(false); | 97 paintController.setSubsequenceCachingIsDisabled(false); |
98 } | 98 } |
99 | 99 |
100 size_t ContentLayerDelegate::approximateUnsharedMemoryUsage() const { | 100 size_t ContentLayerDelegate::approximateUnsharedMemoryUsage() const { |
101 return m_graphicsLayer->getPaintController().approximateUnsharedMemoryUsage(); | 101 return m_graphicsLayer->getPaintController().approximateUnsharedMemoryUsage(); |
102 } | 102 } |
103 | 103 |
104 } // namespace blink | 104 } // namespace blink |
OLD | NEW |