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

Side by Side Diff: Source/platform/graphics/gpu/DrawingBufferTest.cpp

Issue 614883002: Use glDiscardFramebuffer to save memory bandwidth (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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
« no previous file with comments | « Source/platform/graphics/gpu/DrawingBuffer.cpp ('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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 return PassRefPtr<DrawingBufferForTests>(); 183 return PassRefPtr<DrawingBufferForTests>();
184 } 184 }
185 return drawingBuffer.release(); 185 return drawingBuffer.release();
186 } 186 }
187 187
188 DrawingBufferForTests(PassOwnPtr<WebGraphicsContext3D> context, 188 DrawingBufferForTests(PassOwnPtr<WebGraphicsContext3D> context,
189 PassOwnPtr<Extensions3DUtil> extensionsUtil, 189 PassOwnPtr<Extensions3DUtil> extensionsUtil,
190 PreserveDrawingBuffer preserve, 190 PreserveDrawingBuffer preserve,
191 PassRefPtr<ContextEvictionManager> contextEvictionManager) 191 PassRefPtr<ContextEvictionManager> contextEvictionManager)
192 : DrawingBuffer(context, extensionsUtil, false /* multisampleExtensionSu pported */, 192 : DrawingBuffer(context, extensionsUtil, false /* multisampleExtensionSu pported */,
193 false /* packedDepthStencilExtensionSupported */, preserve, WebGraph icsContext3D::Attributes(), contextEvictionManager) 193 false /* packedDepthStencilExtensionSupported */, false /* discardFr amebufferSupported */, preserve, WebGraphicsContext3D::Attributes(), contextEvic tionManager)
194 , m_live(0) 194 , m_live(0)
195 { } 195 { }
196 196
197 virtual ~DrawingBufferForTests() 197 virtual ~DrawingBufferForTests()
198 { 198 {
199 if (m_live) 199 if (m_live)
200 *m_live = false; 200 *m_live = false;
201 } 201 }
202 202
203 bool* m_live; 203 bool* m_live;
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 mailbox.syncPoint = waitSyncPoint; 670 mailbox.syncPoint = waitSyncPoint;
671 m_drawingBuffer->setIsHidden(true); 671 m_drawingBuffer->setIsHidden(true);
672 m_drawingBuffer->mailboxReleased(mailbox); 672 m_drawingBuffer->mailboxReleased(mailbox);
673 // m_drawingBuffer deletes mailbox immediately when hidden. 673 // m_drawingBuffer deletes mailbox immediately when hidden.
674 EXPECT_EQ(waitSyncPoint, webContext()->mostRecentlyWaitedSyncPoint()); 674 EXPECT_EQ(waitSyncPoint, webContext()->mostRecentlyWaitedSyncPoint());
675 675
676 m_drawingBuffer->beginDestruction(); 676 m_drawingBuffer->beginDestruction();
677 } 677 }
678 678
679 } // namespace 679 } // namespace
OLDNEW
« no previous file with comments | « Source/platform/graphics/gpu/DrawingBuffer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698