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

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

Issue 2125153002: Check display list canvas fall back reason unknown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "platform/graphics/RecordingImageBufferSurface.h" 5 #include "platform/graphics/RecordingImageBufferSurface.h"
6 6
7 #include "platform/Histogram.h" 7 #include "platform/Histogram.h"
8 #include "platform/graphics/CanvasMetrics.h" 8 #include "platform/graphics/CanvasMetrics.h"
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 willOverwriteCanvas(); 65 willOverwriteCanvas();
66 } 66 }
67 fallBackToRasterCanvas(FallbackReasonWritePixels); 67 fallBackToRasterCanvas(FallbackReasonWritePixels);
68 } 68 }
69 return m_fallbackSurface->writePixels(origInfo, pixels, rowBytes, x, y); 69 return m_fallbackSurface->writePixels(origInfo, pixels, rowBytes, x, y);
70 } 70 }
71 71
72 void RecordingImageBufferSurface::fallBackToRasterCanvas(FallbackReason reason) 72 void RecordingImageBufferSurface::fallBackToRasterCanvas(FallbackReason reason)
73 { 73 {
74 ASSERT(m_fallbackFactory); 74 ASSERT(m_fallbackFactory);
75 DCHECK(reason != FallbackReasonUnknown); 75 CHECK(reason != FallbackReasonUnknown);
76 76
77 if (m_fallbackSurface) { 77 if (m_fallbackSurface) {
78 ASSERT(!m_currentFrame); 78 ASSERT(!m_currentFrame);
79 return; 79 return;
80 } 80 }
81 81
82 DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, canvasFallbackHistogra m, new EnumerationHistogram("Canvas.DisplayListFallbackReason", FallbackReasonCo unt)); 82 DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, canvasFallbackHistogra m, new EnumerationHistogram("Canvas.DisplayListFallbackReason", FallbackReasonCo unt));
83 canvasFallbackHistogram.count(reason); 83 canvasFallbackHistogram.count(reason);
84 84
85 m_fallbackSurface = m_fallbackFactory->createSurface(size(), getOpacityMode( )); 85 m_fallbackSurface = m_fallbackFactory->createSurface(size(), getOpacityMode( ));
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 360
361 void RecordingImageBufferSurface::setIsHidden(bool hidden) 361 void RecordingImageBufferSurface::setIsHidden(bool hidden)
362 { 362 {
363 if (m_fallbackSurface) 363 if (m_fallbackSurface)
364 m_fallbackSurface->setIsHidden(hidden); 364 m_fallbackSurface->setIsHidden(hidden);
365 else 365 else
366 ImageBufferSurface::setIsHidden(hidden); 366 ImageBufferSurface::setIsHidden(hidden);
367 } 367 }
368 368
369 } // namespace blink 369 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698