| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 if (m_previousFrameHasExpensiveOp) | 238 if (m_previousFrameHasExpensiveOp) |
| 239 return true; | 239 return true; |
| 240 | 240 |
| 241 if (m_previousFramePixelCount >= (size().width() * size().height() * Exp
ensiveCanvasHeuristicParameters::ExpensiveOverdrawThreshold)) | 241 if (m_previousFramePixelCount >= (size().width() * size().height() * Exp
ensiveCanvasHeuristicParameters::ExpensiveOverdrawThreshold)) |
| 242 return true; | 242 return true; |
| 243 } | 243 } |
| 244 | 244 |
| 245 return false; | 245 return false; |
| 246 } | 246 } |
| 247 | 247 |
| 248 const SkBitmap& RecordingImageBufferSurface::deprecatedBitmapForOverwrite() | 248 const SkBitmap RecordingImageBufferSurface::deprecatedBitmapForOverwrite() |
| 249 { | 249 { |
| 250 if (!m_fallbackSurface) { | 250 if (!m_fallbackSurface) { |
| 251 willOverwriteCanvas(); | 251 willOverwriteCanvas(); |
| 252 fallBackToRasterCanvas(); | 252 fallBackToRasterCanvas(); |
| 253 } | 253 } |
| 254 return m_fallbackSurface->deprecatedBitmapForOverwrite(); | 254 return m_fallbackSurface->deprecatedBitmapForOverwrite(); |
| 255 } | 255 } |
| 256 | 256 |
| 257 // Fallback passthroughs | 257 // Fallback passthroughs |
| 258 | 258 |
| (...skipping 20 matching lines...) Expand all 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 |