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

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

Issue 2766553004: WebVR: clear screen after submit if preserveDrawingBuffer is false. (Closed)
Patch Set: Rename to markCompositedAndClearBackbufferIfNeeded Created 3 years, 9 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/Source/modules/webgl/WebGLRenderingContextBase.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 /* 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 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 // Call the DrawingBufferClient method to restore scissor test, mask, and 1510 // Call the DrawingBufferClient method to restore scissor test, mask, and
1511 // clear values, because we dirtied them above. 1511 // clear values, because we dirtied them above.
1512 DrawingBufferClientRestoreScissorTest(); 1512 DrawingBufferClientRestoreScissorTest();
1513 DrawingBufferClientRestoreMaskAndClearValues(); 1513 DrawingBufferClientRestoreMaskAndClearValues();
1514 1514
1515 drawingBuffer()->setBufferClearNeeded(false); 1515 drawingBuffer()->setBufferClearNeeded(false);
1516 1516
1517 return combinedClear ? CombinedClear : JustClear; 1517 return combinedClear ? CombinedClear : JustClear;
1518 } 1518 }
1519 1519
1520 void WebGLRenderingContextBase::markCompositedAndClearBackbufferIfNeeded() {
1521 markLayerComposited();
1522 clearIfComposited();
1523 }
1524
1520 void WebGLRenderingContextBase::restoreScissorEnabled() { 1525 void WebGLRenderingContextBase::restoreScissorEnabled() {
1521 if (isContextLost()) 1526 if (isContextLost())
1522 return; 1527 return;
1523 1528
1524 if (m_scissorEnabled) { 1529 if (m_scissorEnabled) {
1525 contextGL()->Enable(GL_SCISSOR_TEST); 1530 contextGL()->Enable(GL_SCISSOR_TEST);
1526 } else { 1531 } else {
1527 contextGL()->Disable(GL_SCISSOR_TEST); 1532 contextGL()->Disable(GL_SCISSOR_TEST);
1528 } 1533 }
1529 } 1534 }
(...skipping 6310 matching lines...) Expand 10 before | Expand all | Expand 10 after
7840 7845
7841 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( 7846 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas(
7842 HTMLCanvasElementOrOffscreenCanvas& result) const { 7847 HTMLCanvasElementOrOffscreenCanvas& result) const {
7843 if (canvas()) 7848 if (canvas())
7844 result.setHTMLCanvasElement(canvas()); 7849 result.setHTMLCanvasElement(canvas());
7845 else 7850 else
7846 result.setOffscreenCanvas(offscreenCanvas()); 7851 result.setOffscreenCanvas(offscreenCanvas());
7847 } 7852 }
7848 7853
7849 } // namespace blink 7854 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698