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

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

Issue 455863002: Fixing bug in RecordingImageBufferSurface::writePixels when using DisplayList2DCanvas (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master Created 6 years, 4 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 | « Source/platform/graphics/RecordingImageBufferSurface.h ('k') | 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 void RecordingImageBufferSurface::setImageBuffer(ImageBuffer* imageBuffer) 43 void RecordingImageBufferSurface::setImageBuffer(ImageBuffer* imageBuffer)
44 { 44 {
45 m_imageBuffer = imageBuffer; 45 m_imageBuffer = imageBuffer;
46 if (m_currentFrame && m_imageBuffer) { 46 if (m_currentFrame && m_imageBuffer) {
47 m_imageBuffer->context()->setRegionTrackingMode(GraphicsContext::RegionT rackingOverwrite); 47 m_imageBuffer->context()->setRegionTrackingMode(GraphicsContext::RegionT rackingOverwrite);
48 m_imageBuffer->context()->resetCanvas(m_currentFrame->getRecordingCanvas ()); 48 m_imageBuffer->context()->resetCanvas(m_currentFrame->getRecordingCanvas ());
49 } 49 }
50 } 50 }
51 51
52 void RecordingImageBufferSurface::willReadback() 52 void RecordingImageBufferSurface::willAccessPixels()
53 { 53 {
54 fallBackToRasterCanvas(); 54 fallBackToRasterCanvas();
55 } 55 }
56 56
57 void RecordingImageBufferSurface::fallBackToRasterCanvas() 57 void RecordingImageBufferSurface::fallBackToRasterCanvas()
58 { 58 {
59 if (m_rasterCanvas) { 59 if (m_rasterCanvas) {
60 ASSERT(!m_currentFrame); 60 ASSERT(!m_currentFrame);
61 return; 61 return;
62 } 62 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 SkCanvas* newCanvas = m_currentFrame->getRecordingCanvas(); 153 SkCanvas* newCanvas = m_currentFrame->getRecordingCanvas();
154 newCanvas->concat(ctm); 154 newCanvas->concat(ctm);
155 newCanvas->clipRect(clip); 155 newCanvas->clipRect(clip);
156 156
157 m_frameWasCleared = false; 157 m_frameWasCleared = false;
158 return true; 158 return true;
159 } 159 }
160 160
161 } // namespace blink 161 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/RecordingImageBufferSurface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698