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

Side by Side Diff: Source/WebKit/chromium/src/PinchViewports.cpp

Issue 18473002: Add an API to report debugName in GraphicsLayer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: clear setName Created 7 years, 4 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 , m_pageScaleLayer(GraphicsLayer::create(m_owner->graphicsLayerFactory(), th is)) 57 , m_pageScaleLayer(GraphicsLayer::create(m_owner->graphicsLayerFactory(), th is))
58 , m_innerViewportScrollLayer(GraphicsLayer::create(m_owner->graphicsLayerFac tory(), this)) 58 , m_innerViewportScrollLayer(GraphicsLayer::create(m_owner->graphicsLayerFac tory(), this))
59 , m_overlayScrollbarHorizontal(GraphicsLayer::create(m_owner->graphicsLayerF actory(), this)) 59 , m_overlayScrollbarHorizontal(GraphicsLayer::create(m_owner->graphicsLayerF actory(), this))
60 , m_overlayScrollbarVertical(GraphicsLayer::create(m_owner->graphicsLayerFac tory(), this)) 60 , m_overlayScrollbarVertical(GraphicsLayer::create(m_owner->graphicsLayerFac tory(), this))
61 { 61 {
62 m_innerViewportClipLayer->setMasksToBounds(true); 62 m_innerViewportClipLayer->setMasksToBounds(true);
63 m_innerViewportClipLayer->platformLayer()->setIsContainerForFixedPositionLay ers(true); 63 m_innerViewportClipLayer->platformLayer()->setIsContainerForFixedPositionLay ers(true);
64 64
65 m_innerViewportScrollLayer->platformLayer()->setScrollable(true); 65 m_innerViewportScrollLayer->platformLayer()->setScrollable(true);
66 66
67 #ifndef NDEBUG
68 m_innerViewportClipLayer->setName("inner viewport clip layer");
69 m_pageScaleLayer->setName("page scale layer");
70 m_innerViewportScrollLayer->setName("inner viewport scroll layer");
71 m_overlayScrollbarHorizontal->setName("overlay scrollbar horizontal");
72 m_overlayScrollbarVertical->setName("overlay scrollbar vertical");
73 #endif
74
75 m_innerViewportClipLayer->addChild(m_pageScaleLayer.get()); 67 m_innerViewportClipLayer->addChild(m_pageScaleLayer.get());
76 m_pageScaleLayer->addChild(m_innerViewportScrollLayer.get()); 68 m_pageScaleLayer->addChild(m_innerViewportScrollLayer.get());
77 m_innerViewportClipLayer->addChild(m_overlayScrollbarHorizontal.get()); 69 m_innerViewportClipLayer->addChild(m_overlayScrollbarHorizontal.get());
78 m_innerViewportClipLayer->addChild(m_overlayScrollbarVertical.get()); 70 m_innerViewportClipLayer->addChild(m_overlayScrollbarVertical.get());
79 71
80 // Setup the inner viewport overlay scrollbars. 72 // Setup the inner viewport overlay scrollbars.
81 setupScrollbar(WebScrollbar::Horizontal); 73 setupScrollbar(WebScrollbar::Horizontal);
82 setupScrollbar(WebScrollbar::Vertical); 74 setupScrollbar(WebScrollbar::Vertical);
83 } 75 }
84 76
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 168 }
177 169
178 void PinchViewports::notifyAnimationStarted(const GraphicsLayer*, double time) 170 void PinchViewports::notifyAnimationStarted(const GraphicsLayer*, double time)
179 { 171 {
180 } 172 }
181 173
182 void PinchViewports::paintContents(const GraphicsLayer*, WebCore::GraphicsContex t&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& inClip) 174 void PinchViewports::paintContents(const GraphicsLayer*, WebCore::GraphicsContex t&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& inClip)
183 { 175 {
184 } 176 }
185 177
178 String PinchViewports::debugName(const GraphicsLayer* graphicsLayer)
179 {
180 String name;
181 if (graphicsLayer == m_innerViewportClipLayer.get()) {
182 name = "Inner Viewport Clip Layer";
183 } else if (graphicsLayer == m_pageScaleLayer.get()) {
184 name = "Page Scale Layer";
185 } else if (graphicsLayer == m_innerViewportScrollLayer.get()) {
186 name = "Inner Viewport Scroll Layer";
187 } else if (graphicsLayer == m_overlayScrollbarHorizontal.get()) {
188 name = "Overlay Scrollbar Horizontal Layer";
189 } else if (graphicsLayer == m_overlayScrollbarVertical.get()) {
190 name = "Overlay Scrollbar Vertical Layer";
191 }
192
193 return name;
194 }
195
186 } // namespace WebKit 196 } // namespace WebKit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698