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

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

Issue 402613006: Fixing 2D canvas invalidation region tracking. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fixups and baselines Created 6 years, 5 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
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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 } 1069 }
1070 1070
1071 bool hasPaintedContent = containsPaintedContent(); 1071 bool hasPaintedContent = containsPaintedContent();
1072 if (hasPaintedContent && isAcceleratedCanvas(renderer())) { 1072 if (hasPaintedContent && isAcceleratedCanvas(renderer())) {
1073 CanvasRenderingContext* context = toHTMLCanvasElement(renderer()->node() )->renderingContext(); 1073 CanvasRenderingContext* context = toHTMLCanvasElement(renderer()->node() )->renderingContext();
1074 // Content layer may be null if context is lost. 1074 // Content layer may be null if context is lost.
1075 if (blink::WebLayer* contentLayer = context->platformLayer()) { 1075 if (blink::WebLayer* contentLayer = context->platformLayer()) {
1076 Color bgColor(Color::transparent); 1076 Color bgColor(Color::transparent);
1077 if (contentLayerSupportsDirectBackgroundComposition(renderer())) { 1077 if (contentLayerSupportsDirectBackgroundComposition(renderer())) {
1078 bgColor = rendererBackgroundColor(); 1078 bgColor = rendererBackgroundColor();
1079 hasPaintedContent = false;
1080 } 1079 }
1081 contentLayer->setBackgroundColor(bgColor.rgb()); 1080 contentLayer->setBackgroundColor(bgColor.rgb());
1082 } 1081 }
1083 } 1082 }
1084 1083
1085 // FIXME: we could refine this to only allocate backings for one of these la yers if possible. 1084 // FIXME: we could refine this to only allocate backings for one of these la yers if possible.
1086 m_graphicsLayer->setDrawsContent(hasPaintedContent); 1085 m_graphicsLayer->setDrawsContent(hasPaintedContent);
1087 if (m_foregroundLayer) 1086 if (m_foregroundLayer)
1088 m_foregroundLayer->setDrawsContent(hasPaintedContent); 1087 m_foregroundLayer->setDrawsContent(hasPaintedContent);
1089 1088
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after
2243 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2242 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2244 name = "Scrolling Block Selection Layer"; 2243 name = "Scrolling Block Selection Layer";
2245 } else { 2244 } else {
2246 ASSERT_NOT_REACHED(); 2245 ASSERT_NOT_REACHED();
2247 } 2246 }
2248 2247
2249 return name; 2248 return name;
2250 } 2249 }
2251 2250
2252 } // namespace WebCore 2251 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/canvas/CanvasRenderingContext2D.cpp ('k') | Source/platform/graphics/Canvas2DLayerBridge.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698