| OLD | NEW |
| 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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 outTimings = TypeBuilder::Array<TypeBuilder::Array<double> >::create(); | 375 outTimings = TypeBuilder::Array<TypeBuilder::Array<double> >::create(); |
| 376 for (size_t i = 0; i < timings->size(); ++i) { | 376 for (size_t i = 0; i < timings->size(); ++i) { |
| 377 const Vector<double>& row = (*timings)[i]; | 377 const Vector<double>& row = (*timings)[i]; |
| 378 RefPtr<TypeBuilder::Array<double> > outRow = TypeBuilder::Array<double>:
:create(); | 378 RefPtr<TypeBuilder::Array<double> > outRow = TypeBuilder::Array<double>:
:create(); |
| 379 for (size_t j = 1; j < row.size(); ++j) | 379 for (size_t j = 1; j < row.size(); ++j) |
| 380 outRow->addItem(row[j] - row[j - 1]); | 380 outRow->addItem(row[j] - row[j - 1]); |
| 381 outTimings->addItem(outRow.release()); | 381 outTimings->addItem(outRow.release()); |
| 382 } | 382 } |
| 383 } | 383 } |
| 384 | 384 |
| 385 void InspectorLayerTreeAgent::snapshotCommandLog(ErrorString* errorString, const
String& snapshotId, RefPtr<TypeBuilder::Array<JSONObject> >& commandLog) | 385 void InspectorLayerTreeAgent::snapshotCommandLog(ErrorString* errorString, const
String& snapshotId, const int* fromStep, const int* toStep, RefPtr<TypeBuilder:
:Array<JSONObject> >& commandLog) |
| 386 { | 386 { |
| 387 const GraphicsContextSnapshot* snapshot = snapshotById(errorString, snapshot
Id); | 387 const GraphicsContextSnapshot* snapshot = snapshotById(errorString, snapshot
Id); |
| 388 if (!snapshot) | 388 if (!snapshot) |
| 389 return; | 389 return; |
| 390 commandLog = TypeBuilder::Array<JSONObject>::runtimeCast(snapshot->snapshotC
ommandLog()); | 390 commandLog = TypeBuilder::Array<JSONObject>::runtimeCast(snapshot->snapshotC
ommandLog(fromStep ? *fromStep : 0, toStep ? *toStep : 0)); |
| 391 } | 391 } |
| 392 | 392 |
| 393 void InspectorLayerTreeAgent::willAddPageOverlay(const GraphicsLayer* layer) | 393 void InspectorLayerTreeAgent::willAddPageOverlay(const GraphicsLayer* layer) |
| 394 { | 394 { |
| 395 m_pageOverlayLayerIds.append(layer->platformLayer()->id()); | 395 m_pageOverlayLayerIds.append(layer->platformLayer()->id()); |
| 396 } | 396 } |
| 397 | 397 |
| 398 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer) | 398 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer) |
| 399 { | 399 { |
| 400 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id()); | 400 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id()); |
| 401 if (index == WTF::kNotFound) | 401 if (index == WTF::kNotFound) |
| 402 return; | 402 return; |
| 403 m_pageOverlayLayerIds.remove(index); | 403 m_pageOverlayLayerIds.remove(index); |
| 404 } | 404 } |
| 405 | 405 |
| 406 | 406 |
| 407 } // namespace WebCore | 407 } // namespace WebCore |
| OLD | NEW |