Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp

Issue 1407133017: Cleanup some dead code in blink::ImageBuffer and friends (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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()
249 {
250 if (!m_fallbackSurface) {
251 willOverwriteCanvas();
252 fallBackToRasterCanvas();
253 }
254 return m_fallbackSurface->deprecatedBitmapForOverwrite();
255 }
256
257 // Fallback passthroughs 248 // Fallback passthroughs
258 249
259 bool RecordingImageBufferSurface::restore() 250 bool RecordingImageBufferSurface::restore()
260 { 251 {
261 if (m_fallbackSurface) 252 if (m_fallbackSurface)
262 return m_fallbackSurface->restore(); 253 return m_fallbackSurface->restore();
263 return ImageBufferSurface::restore(); 254 return ImageBufferSurface::restore();
264 } 255 }
265 256
266 WebLayer* RecordingImageBufferSurface::layer() const 257 WebLayer* RecordingImageBufferSurface::layer() const
(...skipping 12 matching lines...) Expand all
279 270
280 void RecordingImageBufferSurface::setIsHidden(bool hidden) 271 void RecordingImageBufferSurface::setIsHidden(bool hidden)
281 { 272 {
282 if (m_fallbackSurface) 273 if (m_fallbackSurface)
283 m_fallbackSurface->setIsHidden(hidden); 274 m_fallbackSurface->setIsHidden(hidden);
284 else 275 else
285 ImageBufferSurface::setIsHidden(hidden); 276 ImageBufferSurface::setIsHidden(hidden);
286 } 277 }
287 278
288 } // namespace blink 279 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698