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

Side by Side Diff: third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp

Issue 1512803004: Use refs for GraphicsContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarTheme
Patch Set: Created 5 years 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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 m_instrumentingAgents->setInspectorLayerTreeAgent(0); 183 m_instrumentingAgents->setInspectorLayerTreeAgent(0);
184 m_snapshotById.clear(); 184 m_snapshotById.clear();
185 ErrorString unused; 185 ErrorString unused;
186 } 186 }
187 187
188 void InspectorLayerTreeAgent::layerTreeDidChange() 188 void InspectorLayerTreeAgent::layerTreeDidChange()
189 { 189 {
190 frontend()->layerTreeDidChange(buildLayerTree()); 190 frontend()->layerTreeDidChange(buildLayerTree());
191 } 191 }
192 192
193 void InspectorLayerTreeAgent::didPaint(LayoutObject*, const GraphicsLayer* graph icsLayer, GraphicsContext*, const LayoutRect& rect) 193 void InspectorLayerTreeAgent::didPaint(LayoutObject*, const GraphicsLayer* graph icsLayer, GraphicsContext&, const LayoutRect& rect)
194 { 194 {
195 // Should only happen for FrameView paints when compositing is off. Consider different instrumentation method for that. 195 // Should only happen for FrameView paints when compositing is off. Consider different instrumentation method for that.
196 if (!graphicsLayer) 196 if (!graphicsLayer)
197 return; 197 return;
198 198
199 RefPtr<TypeBuilder::DOM::Rect> domRect = TypeBuilder::DOM::Rect::create() 199 RefPtr<TypeBuilder::DOM::Rect> domRect = TypeBuilder::DOM::Rect::create()
200 .setX(rect.x()) 200 .setX(rect.x())
201 .setY(rect.y()) 201 .setY(rect.y())
202 .setWidth(rect.width()) 202 .setWidth(rect.width())
203 .setHeight(rect.height()); 203 .setHeight(rect.height());
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer) 467 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer)
468 { 468 {
469 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id()); 469 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id());
470 if (index == WTF::kNotFound) 470 if (index == WTF::kNotFound)
471 return; 471 return;
472 m_pageOverlayLayerIds.remove(index); 472 m_pageOverlayLayerIds.remove(index);
473 } 473 }
474 474
475 475
476 } // namespace blink 476 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698