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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 return ImageBufferSurface::layer(); | 259 return ImageBufferSurface::layer(); |
260 } | 260 } |
261 | 261 |
262 bool RecordingImageBufferSurface::isAccelerated() const | 262 bool RecordingImageBufferSurface::isAccelerated() const |
263 { | 263 { |
264 if (m_fallbackSurface) | 264 if (m_fallbackSurface) |
265 return m_fallbackSurface->isAccelerated(); | 265 return m_fallbackSurface->isAccelerated(); |
266 return ImageBufferSurface::isAccelerated(); | 266 return ImageBufferSurface::isAccelerated(); |
267 } | 267 } |
268 | 268 |
269 bool RecordingImageBufferSurface::cachedBitmapEnabled() const | |
270 { | |
271 if (m_fallbackSurface) | |
272 return m_fallbackSurface->cachedBitmapEnabled(); | |
273 return ImageBufferSurface::cachedBitmapEnabled(); | |
274 } | |
275 | |
276 const SkBitmap& RecordingImageBufferSurface::cachedBitmap() const | |
277 { | |
278 if (m_fallbackSurface) | |
279 return m_fallbackSurface->cachedBitmap(); | |
280 return ImageBufferSurface::cachedBitmap(); | |
281 } | |
282 | |
283 void RecordingImageBufferSurface::invalidateCachedBitmap() | |
284 { | |
285 if (m_fallbackSurface) | |
286 m_fallbackSurface->invalidateCachedBitmap(); | |
287 else | |
288 ImageBufferSurface::invalidateCachedBitmap(); | |
289 } | |
290 | |
291 void RecordingImageBufferSurface::updateCachedBitmapIfNeeded() | |
292 { | |
293 if (m_fallbackSurface) | |
294 m_fallbackSurface->updateCachedBitmapIfNeeded(); | |
295 else | |
296 ImageBufferSurface::updateCachedBitmapIfNeeded(); | |
297 } | |
298 | |
299 void RecordingImageBufferSurface::setIsHidden(bool hidden) | 269 void RecordingImageBufferSurface::setIsHidden(bool hidden) |
300 { | 270 { |
301 if (m_fallbackSurface) | 271 if (m_fallbackSurface) |
302 m_fallbackSurface->setIsHidden(hidden); | 272 m_fallbackSurface->setIsHidden(hidden); |
303 else | 273 else |
304 ImageBufferSurface::setIsHidden(hidden); | 274 ImageBufferSurface::setIsHidden(hidden); |
305 } | 275 } |
306 | 276 |
307 } // namespace blink | 277 } // namespace blink |
OLD | NEW |