| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 wantAcceleration = false; | 562 wantAcceleration = false; |
| 563 m_softwareRenderingWhileHidden = true; | 563 m_softwareRenderingWhileHidden = true; |
| 564 } | 564 } |
| 565 | 565 |
| 566 bool surfaceIsAccelerated; | 566 bool surfaceIsAccelerated; |
| 567 m_surface = createSkSurface( | 567 m_surface = createSkSurface( |
| 568 wantAcceleration ? m_contextProvider->grContext() : nullptr, m_size, | 568 wantAcceleration ? m_contextProvider->grContext() : nullptr, m_size, |
| 569 m_msaaSampleCount, m_opacityMode, skSurfaceColorSpace(), m_colorType, | 569 m_msaaSampleCount, m_opacityMode, skSurfaceColorSpace(), m_colorType, |
| 570 &surfaceIsAccelerated); | 570 &surfaceIsAccelerated); |
| 571 m_surfacePaintCanvas = | 571 m_surfacePaintCanvas = |
| 572 WTF::wrapUnique(new PaintCanvas(m_surface->getCanvas())); | 572 WTF::wrapUnique(new SkiaPaintCanvas(m_surface->getCanvas())); |
| 573 | 573 |
| 574 if (m_surface) { | 574 if (m_surface) { |
| 575 // Always save an initial frame, to support resetting the top level matrix | 575 // Always save an initial frame, to support resetting the top level matrix |
| 576 // and clip. | 576 // and clip. |
| 577 m_surfacePaintCanvas->save(); | 577 m_surfacePaintCanvas->save(); |
| 578 } else { | 578 } else { |
| 579 reportSurfaceCreationFailure(); | 579 reportSurfaceCreationFailure(); |
| 580 } | 580 } |
| 581 | 581 |
| 582 if (m_surface && surfaceIsAccelerated && !m_layer) { | 582 if (m_surface && surfaceIsAccelerated && !m_layer) { |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1116 default; | 1116 default; |
| 1117 | 1117 |
| 1118 void Canvas2DLayerBridge::Logger::reportHibernationEvent( | 1118 void Canvas2DLayerBridge::Logger::reportHibernationEvent( |
| 1119 HibernationEvent event) { | 1119 HibernationEvent event) { |
| 1120 DEFINE_STATIC_LOCAL(EnumerationHistogram, hibernationHistogram, | 1120 DEFINE_STATIC_LOCAL(EnumerationHistogram, hibernationHistogram, |
| 1121 ("Canvas.HibernationEvents", HibernationEventCount)); | 1121 ("Canvas.HibernationEvents", HibernationEventCount)); |
| 1122 hibernationHistogram.count(event); | 1122 hibernationHistogram.count(event); |
| 1123 } | 1123 } |
| 1124 | 1124 |
| 1125 } // namespace blink | 1125 } // namespace blink |
| OLD | NEW |