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

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: 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; 1079 // hasPaintedContent = false;
Stephen White 2014/07/17 15:28:19 ?
Justin Novosad 2014/07/17 17:07:21 Done.
1080 } 1080 }
1081 contentLayer->setBackgroundColor(bgColor.rgb()); 1081 contentLayer->setBackgroundColor(bgColor.rgb());
1082 } 1082 }
1083 } 1083 }
1084 1084
1085 // FIXME: we could refine this to only allocate backings for one of these la yers if possible. 1085 // FIXME: we could refine this to only allocate backings for one of these la yers if possible.
1086 m_graphicsLayer->setDrawsContent(hasPaintedContent); 1086 m_graphicsLayer->setDrawsContent(hasPaintedContent);
1087 if (m_foregroundLayer) 1087 if (m_foregroundLayer)
1088 m_foregroundLayer->setDrawsContent(hasPaintedContent); 1088 m_foregroundLayer->setDrawsContent(hasPaintedContent);
1089 1089
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after
2243 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2243 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2244 name = "Scrolling Block Selection Layer"; 2244 name = "Scrolling Block Selection Layer";
2245 } else { 2245 } else {
2246 ASSERT_NOT_REACHED(); 2246 ASSERT_NOT_REACHED();
2247 } 2247 }
2248 2248
2249 return name; 2249 return name;
2250 } 2250 }
2251 2251
2252 } // namespace WebCore 2252 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698