| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 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 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1230 { | 1230 { |
| 1231 if (m_scrollableArea) { | 1231 if (m_scrollableArea) { |
| 1232 DoublePoint newPosition = m_scrollableArea->minimumScrollPosition() + to
DoubleSize(m_layer->layer()->scrollPositionDouble()); | 1232 DoublePoint newPosition = m_scrollableArea->minimumScrollPosition() + to
DoubleSize(m_layer->layer()->scrollPositionDouble()); |
| 1233 | 1233 |
| 1234 // FrameView::setScrollPosition doesn't work for compositor commits (int
eracts poorly with programmatic scroll animations) | 1234 // FrameView::setScrollPosition doesn't work for compositor commits (int
eracts poorly with programmatic scroll animations) |
| 1235 // so we need to use the ScrollableArea version. The FrameView method sh
ould go away soon anyway. | 1235 // so we need to use the ScrollableArea version. The FrameView method sh
ould go away soon anyway. |
| 1236 m_scrollableArea->ScrollableArea::setScrollPosition(newPosition, Composi
torScroll); | 1236 m_scrollableArea->ScrollableArea::setScrollPosition(newPosition, Composi
torScroll); |
| 1237 } | 1237 } |
| 1238 } | 1238 } |
| 1239 | 1239 |
| 1240 scoped_refptr<base::trace_event::ConvertableToTraceFormat> GraphicsLayer::TakeDe
bugInfo(cc::Layer* layer) | 1240 scoped_ptr<base::trace_event::ConvertableToTraceFormat> GraphicsLayer::TakeDebug
Info(cc::Layer* layer) |
| 1241 { | 1241 { |
| 1242 scoped_refptr<base::trace_event::TracedValue> tracedValue = m_debugInfo.asTr
acedValue(); | 1242 scoped_ptr<base::trace_event::TracedValue> tracedValue(m_debugInfo.asTracedV
alue()); |
| 1243 tracedValue->SetString("layer_name", WTF::StringUTF8Adaptor(debugName(layer)
).asStringPiece()); | 1243 tracedValue->SetString("layer_name", WTF::StringUTF8Adaptor(debugName(layer)
).asStringPiece()); |
| 1244 return tracedValue; | 1244 return std::move(tracedValue); |
| 1245 } | 1245 } |
| 1246 | 1246 |
| 1247 PaintController& GraphicsLayer::paintController() | 1247 PaintController& GraphicsLayer::paintController() |
| 1248 { | 1248 { |
| 1249 RELEASE_ASSERT(drawsContent()); | 1249 RELEASE_ASSERT(drawsContent()); |
| 1250 if (!m_paintController) | 1250 if (!m_paintController) |
| 1251 m_paintController = PaintController::create(); | 1251 m_paintController = PaintController::create(); |
| 1252 return *m_paintController; | 1252 return *m_paintController; |
| 1253 } | 1253 } |
| 1254 | 1254 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1271 { | 1271 { |
| 1272 if (!layer) { | 1272 if (!layer) { |
| 1273 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); | 1273 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); |
| 1274 return; | 1274 return; |
| 1275 } | 1275 } |
| 1276 | 1276 |
| 1277 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); | 1277 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); |
| 1278 fprintf(stderr, "%s\n", output.utf8().data()); | 1278 fprintf(stderr, "%s\n", output.utf8().data()); |
| 1279 } | 1279 } |
| 1280 #endif | 1280 #endif |
| OLD | NEW |