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

Side by Side Diff: Source/core/html/canvas/WebGLRenderingContextBase.h

Issue 251373005: WebGL: Refactor active context management. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase to ToT Created 6 years, 5 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 | « no previous file | Source/core/html/canvas/WebGLRenderingContextBase.cpp » ('j') | 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 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 void findNewMaxEnabledAttribIndex(); 888 void findNewMaxEnabledAttribIndex();
889 void findNewMaxNonDefaultTextureUnit(); 889 void findNewMaxNonDefaultTextureUnit();
890 890
891 friend class WebGLStateRestorer; 891 friend class WebGLStateRestorer;
892 friend class WebGLRenderingContextEvictionManager; 892 friend class WebGLRenderingContextEvictionManager;
893 893
894 static Vector<WebGLRenderingContextBase*>& activeContexts(); 894 static Vector<WebGLRenderingContextBase*>& activeContexts();
895 static Vector<WebGLRenderingContextBase*>& forciblyEvictedContexts(); 895 static Vector<WebGLRenderingContextBase*>& forciblyEvictedContexts();
896 896
897 static void activateContext(WebGLRenderingContextBase*); 897 static void activateContext(WebGLRenderingContextBase*);
898 static void deactivateContext(WebGLRenderingContextBase*, bool addToInactive List); 898 static void deactivateContext(WebGLRenderingContextBase*);
899 static void addToEvictedList(WebGLRenderingContextBase*);
899 static void willDestroyContext(WebGLRenderingContextBase*); 900 static void willDestroyContext(WebGLRenderingContextBase*);
900 static void forciblyLoseOldestContext(const String& reason); 901 static void forciblyLoseOldestContext(const String& reason);
901 // Return the least recently used context's position in the active context v ector. 902 // Return the least recently used context's position in the active context v ector.
902 // If the vector is empty, return the maximum allowed active context number. 903 // If the vector is empty, return the maximum allowed active context number.
903 static size_t oldestContextIndex(); 904 static size_t oldestContextIndex();
904 static IntSize oldestContextSize(); 905 static IntSize oldestContextSize();
905 }; 906 };
906 907
907 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d()); 908 DEFINE_TYPE_CASTS(WebGLRenderingContextBase, CanvasRenderingContext, context, co ntext->is3d(), context.is3d());
908 909
909 } // namespace WebCore 910 } // namespace WebCore
910 911
911 #endif // WebGLRenderingContextBase_h 912 #endif // WebGLRenderingContextBase_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/canvas/WebGLRenderingContextBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698