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

Side by Side Diff: Source/core/paint/CompositingRecorder.cpp

Issue 1193433004: Blink-side contiguous allocation of display items. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add ListContainer::AllocateAndConstructWithArguments and a TODO in DisplayItemList::findMatchingIte… Created 5 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
« no previous file with comments | « Source/core/paint/BoxClipper.cpp ('k') | Source/core/paint/DisplayItemListPaintTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/paint/CompositingRecorder.h" 6 #include "core/paint/CompositingRecorder.h"
7 7
8 #include "core/layout/LayoutObject.h" 8 #include "core/layout/LayoutObject.h"
9 #include "platform/graphics/GraphicsContext.h" 9 #include "platform/graphics/GraphicsContext.h"
10 #include "platform/graphics/GraphicsLayer.h" 10 #include "platform/graphics/GraphicsLayer.h"
(...skipping 13 matching lines...) Expand all
24 { 24 {
25 endCompositing(m_graphicsContext, m_client); 25 endCompositing(m_graphicsContext, m_client);
26 } 26 }
27 27
28 void CompositingRecorder::beginCompositing(GraphicsContext& graphicsContext, con st DisplayItemClientWrapper& client, const SkXfermode::Mode xferMode, const floa t opacity, const FloatRect* bounds, ColorFilter colorFilter) 28 void CompositingRecorder::beginCompositing(GraphicsContext& graphicsContext, con st DisplayItemClientWrapper& client, const SkXfermode::Mode xferMode, const floa t opacity, const FloatRect* bounds, ColorFilter colorFilter)
29 { 29 {
30 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) { 30 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
31 ASSERT(graphicsContext.displayItemList()); 31 ASSERT(graphicsContext.displayItemList());
32 if (graphicsContext.displayItemList()->displayItemConstructionIsDisabled ()) 32 if (graphicsContext.displayItemList()->displayItemConstructionIsDisabled ())
33 return; 33 return;
34 graphicsContext.displayItemList()->add(BeginCompositingDisplayItem::crea te(client, xferMode, opacity, bounds, colorFilter)); 34 graphicsContext.displayItemList()->createAndAppend<BeginCompositingDispl ayItem>(client, xferMode, opacity, bounds, colorFilter);
35 } else { 35 } else {
36 BeginCompositingDisplayItem beginCompositingDisplayItem(client, xferMode , opacity, bounds, colorFilter); 36 BeginCompositingDisplayItem compositingDisplayItem(client, xferMode, opa city, bounds, colorFilter);
37 beginCompositingDisplayItem.replay(graphicsContext); 37 compositingDisplayItem.replay(graphicsContext);
38 } 38 }
39 } 39 }
40 40
41 void CompositingRecorder::endCompositing(GraphicsContext& graphicsContext, const DisplayItemClientWrapper& client) 41 void CompositingRecorder::endCompositing(GraphicsContext& graphicsContext, const DisplayItemClientWrapper& client)
42 { 42 {
43 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) { 43 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
44 ASSERT(graphicsContext.displayItemList()); 44 ASSERT(graphicsContext.displayItemList());
45 if (!graphicsContext.displayItemList()->displayItemConstructionIsDisable d()) { 45 if (!graphicsContext.displayItemList()->displayItemConstructionIsDisable d()) {
46 if (graphicsContext.displayItemList()->lastDisplayItemIsNoopBegin()) 46 if (graphicsContext.displayItemList()->lastDisplayItemIsNoopBegin())
47 graphicsContext.displayItemList()->removeLastDisplayItem(); 47 graphicsContext.displayItemList()->removeLastDisplayItem();
48 else 48 else
49 graphicsContext.displayItemList()->add(EndCompositingDisplayItem ::create(client)); 49 graphicsContext.displayItemList()->createAndAppend<EndCompositin gDisplayItem>(client);
50 } 50 }
51 } else { 51 } else {
52 EndCompositingDisplayItem endCompositingDisplayItem(client); 52 EndCompositingDisplayItem endCompositingDisplayItem(client);
53 endCompositingDisplayItem.replay(graphicsContext); 53 endCompositingDisplayItem.replay(graphicsContext);
54 } 54 }
55 } 55 }
56 56
57 } // namespace blink 57 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/BoxClipper.cpp ('k') | Source/core/paint/DisplayItemListPaintTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698