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

Unified Diff: Source/core/platform/graphics/gpu/DrawingBuffer.h

Issue 14217005: Limit the number of WebGL contexts that are active at any given time (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated and rebased on DrawingBuffer refactor Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/platform/graphics/gpu/DrawingBuffer.h
diff --git a/Source/core/platform/graphics/gpu/DrawingBuffer.h b/Source/core/platform/graphics/gpu/DrawingBuffer.h
index 1d8c2b7a98cd3c69ffc81bcfd2a41f7f6ff26caf..7087674ee587c06f7d4c171a22e343f03fe1984e 100644
--- a/Source/core/platform/graphics/gpu/DrawingBuffer.h
+++ b/Source/core/platform/graphics/gpu/DrawingBuffer.h
@@ -152,6 +152,10 @@ private:
// Calculates the difference in pixels between the current buffer size and the proposed size.
int pixelDelta(const IntSize& size);
+ // Given the desired buffer size, provides the largest dimensions that will fit in the pixel budget
+ // Returns true if the buffer will only fit if the oldest WebGL context is forcibly lost
+ IntSize adjustSizeWithContextEviction(const IntSize&, bool& evictContext);
+
PreserveDrawingBuffer m_preserveDrawingBuffer;
bool m_scissorEnabled;
Platform3DObject m_texture2DBinding;

Powered by Google App Engine
This is Rietveld 408576698