| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "platform/graphics/RecordingImageBufferSurface.h" | 7 #include "platform/graphics/RecordingImageBufferSurface.h" |
| 8 | 8 |
| 9 #include "platform/graphics/ExpensiveCanvasHeuristicParameters.h" | 9 #include "platform/graphics/ExpensiveCanvasHeuristicParameters.h" |
| 10 #include "platform/graphics/GraphicsContext.h" | 10 #include "platform/graphics/GraphicsContext.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 currentPicture->playback(m_fallbackSurface->canvas()); | 90 currentPicture->playback(m_fallbackSurface->canvas()); |
| 91 m_currentFrame.clear(); | 91 m_currentFrame.clear(); |
| 92 } | 92 } |
| 93 | 93 |
| 94 if (m_imageBuffer) { | 94 if (m_imageBuffer) { |
| 95 m_imageBuffer->resetCanvas(m_fallbackSurface->canvas()); | 95 m_imageBuffer->resetCanvas(m_fallbackSurface->canvas()); |
| 96 } | 96 } |
| 97 | 97 |
| 98 } | 98 } |
| 99 | 99 |
| 100 PassRefPtr<SkImage> RecordingImageBufferSurface::newImageSnapshot() | 100 PassRefPtr<SkImage> RecordingImageBufferSurface::newImageSnapshot(AccelerationHi
nt hint) |
| 101 { | 101 { |
| 102 if (!m_fallbackSurface) | 102 if (!m_fallbackSurface) |
| 103 fallBackToRasterCanvas(); | 103 fallBackToRasterCanvas(); |
| 104 return m_fallbackSurface->newImageSnapshot(); | 104 return m_fallbackSurface->newImageSnapshot(hint); |
| 105 } | 105 } |
| 106 | 106 |
| 107 SkCanvas* RecordingImageBufferSurface::canvas() | 107 SkCanvas* RecordingImageBufferSurface::canvas() |
| 108 { | 108 { |
| 109 if (m_fallbackSurface) | 109 if (m_fallbackSurface) |
| 110 return m_fallbackSurface->canvas(); | 110 return m_fallbackSurface->canvas(); |
| 111 | 111 |
| 112 ASSERT(m_currentFrame->getRecordingCanvas()); | 112 ASSERT(m_currentFrame->getRecordingCanvas()); |
| 113 return m_currentFrame->getRecordingCanvas(); | 113 return m_currentFrame->getRecordingCanvas(); |
| 114 } | 114 } |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 | 279 |
| 280 void RecordingImageBufferSurface::setIsHidden(bool hidden) | 280 void RecordingImageBufferSurface::setIsHidden(bool hidden) |
| 281 { | 281 { |
| 282 if (m_fallbackSurface) | 282 if (m_fallbackSurface) |
| 283 m_fallbackSurface->setIsHidden(hidden); | 283 m_fallbackSurface->setIsHidden(hidden); |
| 284 else | 284 else |
| 285 ImageBufferSurface::setIsHidden(hidden); | 285 ImageBufferSurface::setIsHidden(hidden); |
| 286 } | 286 } |
| 287 | 287 |
| 288 } // namespace blink | 288 } // namespace blink |
| OLD | NEW |