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

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

Issue 1361043003: Revert of Make 2D canvas smarter about chosing whether or not to use GPU acceleration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(AccelerationHi nt hint) 100 PassRefPtr<SkImage> RecordingImageBufferSurface::newImageSnapshot()
101 { 101 {
102 if (!m_fallbackSurface) 102 if (!m_fallbackSurface)
103 fallBackToRasterCanvas(); 103 fallBackToRasterCanvas();
104 return m_fallbackSurface->newImageSnapshot(hint); 104 return m_fallbackSurface->newImageSnapshot();
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698