| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 | 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 virtual void setNeedsAnimate() = 0; | 84 virtual void setNeedsAnimate() = 0; |
| 85 virtual void setNeedsCommit() = 0; | 85 virtual void setNeedsCommit() = 0; |
| 86 virtual void setNeedsRedraw() = 0; | 86 virtual void setNeedsRedraw() = 0; |
| 87 virtual void setVisible(bool) = 0; | 87 virtual void setVisible(bool) = 0; |
| 88 | 88 |
| 89 virtual bool commitRequested() const = 0; | 89 virtual bool commitRequested() const = 0; |
| 90 | 90 |
| 91 virtual void start() = 0; // Must be called before using the proxy. | 91 virtual void start() = 0; // Must be called before using the proxy. |
| 92 virtual void stop() = 0; // Must be called before deleting the proxy. | 92 virtual void stop() = 0; // Must be called before deleting the proxy. |
| 93 | 93 |
| 94 // Forces 3D commands on all contexts to wait for all previous SwapBuffers t
o finish before executing in the GPU |
| 95 // process. |
| 96 virtual void forceSerializeOnSwapBuffers() = 0; |
| 97 |
| 94 // Maximum number of sub-region texture updates supported for each commit. | 98 // Maximum number of sub-region texture updates supported for each commit. |
| 95 virtual size_t maxPartialTextureUpdates() const = 0; | 99 virtual size_t maxPartialTextureUpdates() const = 0; |
| 96 | 100 |
| 97 // Debug hooks | 101 // Debug hooks |
| 98 #ifndef NDEBUG | 102 #ifndef NDEBUG |
| 99 static bool isMainThread(); | 103 static bool isMainThread(); |
| 100 static bool isImplThread(); | 104 static bool isImplThread(); |
| 101 #endif | 105 #endif |
| 102 | 106 |
| 103 // Temporary hack while render_widget still does scheduling for CCLayerTreeH
ostMainThreadI | 107 // Temporary hack while render_widget still does scheduling for CCLayerTreeH
ostMainThreadI |
| 104 virtual GraphicsContext3D* context() = 0; | 108 virtual GraphicsContext3D* context() = 0; |
| 105 | 109 |
| 106 // Testing hooks | 110 // Testing hooks |
| 107 virtual void loseContext() = 0; | 111 virtual void loseContext() = 0; |
| 108 | 112 |
| 109 #ifndef NDEBUG | 113 #ifndef NDEBUG |
| 110 static void setCurrentThreadIsImplThread(bool); | 114 static void setCurrentThreadIsImplThread(bool); |
| 111 #endif | 115 #endif |
| 112 | 116 |
| 113 protected: | 117 protected: |
| 114 CCProxy(); | 118 CCProxy(); |
| 115 friend class DebugScopedSetImplThread; | 119 friend class DebugScopedSetImplThread; |
| 116 }; | 120 }; |
| 117 | 121 |
| 118 } | 122 } |
| 119 | 123 |
| 120 #endif | 124 #endif |
| OLD | NEW |