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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp

Issue 1387563004: Revert of Fixed WebGL printing crash due to failed buffer allocation (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
« no previous file with comments | « third_party/WebKit/LayoutTests/printing/webgl-oversized-printing-expected.txt ('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 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 if (isContextLost()) 1238 if (isContextLost())
1239 return false; 1239 return false;
1240 1240
1241 bool mustClearNow = clearIfComposited() != Skipped; 1241 bool mustClearNow = clearIfComposited() != Skipped;
1242 if (!m_markedCanvasDirty && !mustClearNow) 1242 if (!m_markedCanvasDirty && !mustClearNow)
1243 return false; 1243 return false;
1244 1244
1245 canvas()->clearCopiedImage(); 1245 canvas()->clearCopiedImage();
1246 m_markedCanvasDirty = false; 1246 m_markedCanvasDirty = false;
1247 1247
1248 if (!canvas()->buffer())
1249 return false;
1250
1251 ScopedTexture2DRestorer restorer(this); 1248 ScopedTexture2DRestorer restorer(this);
1252 ScopedFramebufferRestorer fboRestorer(this); 1249 ScopedFramebufferRestorer fboRestorer(this);
1253 1250
1254 drawingBuffer()->commit(); 1251 drawingBuffer()->commit();
1255 if (!canvas()->buffer()->copyRenderingResultsFromDrawingBuffer(drawingBuffer (), sourceBuffer)) { 1252 if (!canvas()->buffer()->copyRenderingResultsFromDrawingBuffer(drawingBuffer (), sourceBuffer)) {
1256 canvas()->ensureUnacceleratedImageBuffer(); 1253 canvas()->ensureUnacceleratedImageBuffer();
1257 if (canvas()->hasImageBuffer()) 1254 if (canvas()->hasImageBuffer())
1258 drawingBuffer()->paintRenderingResultsToCanvas(canvas()->buffer()); 1255 drawingBuffer()->paintRenderingResultsToCanvas(canvas()->buffer());
1259 } 1256 }
1260 1257
(...skipping 5476 matching lines...) Expand 10 before | Expand all | Expand 10 after
6737 6734
6738 return totalBytesPerPixel; 6735 return totalBytesPerPixel;
6739 } 6736 }
6740 6737
6741 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const 6738 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const
6742 { 6739 {
6743 return m_drawingBuffer.get(); 6740 return m_drawingBuffer.get();
6744 } 6741 }
6745 6742
6746 } // namespace blink 6743 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/printing/webgl-oversized-printing-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698