Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(558)

Side by Side Diff: Source/core/rendering/compositing/CompositedLayerMapping.cpp

Issue 541783002: Partial revert of r178392 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/compositing/layer-creation/spanOverlapsCanvas-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 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 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 } 1103 }
1104 1104
1105 bool hasPaintedContent = containsPaintedContent(); 1105 bool hasPaintedContent = containsPaintedContent();
1106 if (hasPaintedContent && isAcceleratedCanvas(renderer())) { 1106 if (hasPaintedContent && isAcceleratedCanvas(renderer())) {
1107 CanvasRenderingContext* context = toHTMLCanvasElement(renderer()->node() )->renderingContext(); 1107 CanvasRenderingContext* context = toHTMLCanvasElement(renderer()->node() )->renderingContext();
1108 // Content layer may be null if context is lost. 1108 // Content layer may be null if context is lost.
1109 if (WebLayer* contentLayer = context->platformLayer()) { 1109 if (WebLayer* contentLayer = context->platformLayer()) {
1110 Color bgColor(Color::transparent); 1110 Color bgColor(Color::transparent);
1111 if (contentLayerSupportsDirectBackgroundComposition(renderer())) { 1111 if (contentLayerSupportsDirectBackgroundComposition(renderer())) {
1112 bgColor = rendererBackgroundColor(); 1112 bgColor = rendererBackgroundColor();
1113 hasPaintedContent = false;
1113 } 1114 }
1114 contentLayer->setBackgroundColor(bgColor.rgb()); 1115 contentLayer->setBackgroundColor(bgColor.rgb());
1115 } 1116 }
1116 } 1117 }
1117 1118
1118 // FIXME: we could refine this to only allocate backings for one of these la yers if possible. 1119 // FIXME: we could refine this to only allocate backings for one of these la yers if possible.
1119 m_graphicsLayer->setDrawsContent(hasPaintedContent); 1120 m_graphicsLayer->setDrawsContent(hasPaintedContent);
1120 if (m_foregroundLayer) 1121 if (m_foregroundLayer)
1121 m_foregroundLayer->setDrawsContent(hasPaintedContent); 1122 m_foregroundLayer->setDrawsContent(hasPaintedContent);
1122 1123
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after
2283 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2284 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2284 name = "Scrolling Block Selection Layer"; 2285 name = "Scrolling Block Selection Layer";
2285 } else { 2286 } else {
2286 ASSERT_NOT_REACHED(); 2287 ASSERT_NOT_REACHED();
2287 } 2288 }
2288 2289
2289 return name; 2290 return name;
2290 } 2291 }
2291 2292
2292 } // namespace blink 2293 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/compositing/layer-creation/spanOverlapsCanvas-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698