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

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

Issue 669993004: Fix display list canvas fallback to GPU accelerated mode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« 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 "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/GraphicsContext.h" 9 #include "platform/graphics/GraphicsContext.h"
10 #include "platform/graphics/ImageBuffer.h" 10 #include "platform/graphics/ImageBuffer.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 RefPtr<SkPicture> currentPicture = adoptRef(m_currentFrame->endRecording ()); 96 RefPtr<SkPicture> currentPicture = adoptRef(m_currentFrame->endRecording ());
97 currentPicture->draw(m_fallbackSurface->canvas()); 97 currentPicture->draw(m_fallbackSurface->canvas());
98 m_currentFrame.clear(); 98 m_currentFrame.clear();
99 if (savedState) 99 if (savedState)
100 setCurrentState(m_fallbackSurface->canvas(), &stateStack); 100 setCurrentState(m_fallbackSurface->canvas(), &stateStack);
101 } 101 }
102 102
103 if (m_imageBuffer) { 103 if (m_imageBuffer) {
104 m_imageBuffer->context()->setRegionTrackingMode(GraphicsContext::RegionT rackingDisabled); 104 m_imageBuffer->context()->setRegionTrackingMode(GraphicsContext::RegionT rackingDisabled);
105 m_imageBuffer->context()->resetCanvas(m_fallbackSurface->canvas()); 105 m_imageBuffer->context()->resetCanvas(m_fallbackSurface->canvas());
106 m_imageBuffer->context()->setAccelerated(m_fallbackSurface->isAccelerate d());
106 } 107 }
107 } 108 }
108 109
109 SkCanvas* RecordingImageBufferSurface::canvas() const 110 SkCanvas* RecordingImageBufferSurface::canvas() const
110 { 111 {
111 if (m_fallbackSurface) 112 if (m_fallbackSurface)
112 return m_fallbackSurface->canvas(); 113 return m_fallbackSurface->canvas();
113 114
114 ASSERT(m_currentFrame->getRecordingCanvas()); 115 ASSERT(m_currentFrame->getRecordingCanvas());
115 return m_currentFrame->getRecordingCanvas(); 116 return m_currentFrame->getRecordingCanvas();
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 287
287 void RecordingImageBufferSurface::setIsHidden(bool hidden) 288 void RecordingImageBufferSurface::setIsHidden(bool hidden)
288 { 289 {
289 if (m_fallbackSurface) 290 if (m_fallbackSurface)
290 m_fallbackSurface->setIsHidden(hidden); 291 m_fallbackSurface->setIsHidden(hidden);
291 else 292 else
292 ImageBufferSurface::setIsHidden(hidden); 293 ImageBufferSurface::setIsHidden(hidden);
293 } 294 }
294 295
295 } // namespace blink 296 } // 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