OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/gl/gl_context.h" | 5 #include "ui/gl/gl_context.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/sys_info.h" | 9 #include "base/sys_info.h" |
10 #include "ui/gl/gl_bindings.h" | 10 #include "ui/gl/gl_bindings.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 GLNonOwnedContext(GLShareGroup* share_group); | 26 GLNonOwnedContext(GLShareGroup* share_group); |
27 | 27 |
28 // Implement GLContext. | 28 // Implement GLContext. |
29 virtual bool Initialize(GLSurface* compatible_surface, | 29 virtual bool Initialize(GLSurface* compatible_surface, |
30 GpuPreference gpu_preference) override; | 30 GpuPreference gpu_preference) override; |
31 virtual void Destroy() override {} | 31 virtual void Destroy() override {} |
32 virtual bool MakeCurrent(GLSurface* surface) override; | 32 virtual bool MakeCurrent(GLSurface* surface) override; |
33 virtual void ReleaseCurrent(GLSurface* surface) override {} | 33 virtual void ReleaseCurrent(GLSurface* surface) override {} |
34 virtual bool IsCurrent(GLSurface* surface) override { return true; } | 34 virtual bool IsCurrent(GLSurface* surface) override { return true; } |
35 virtual void* GetHandle() override { return NULL; } | 35 virtual void* GetHandle() override { return NULL; } |
36 virtual void SetSwapInterval(int interval) override {} | 36 virtual void OnSetSwapInterval(int interval) override {} |
37 virtual std::string GetExtensions() override; | 37 virtual std::string GetExtensions() override; |
38 | 38 |
39 protected: | 39 protected: |
40 virtual ~GLNonOwnedContext() {} | 40 virtual ~GLNonOwnedContext() {} |
41 | 41 |
42 private: | 42 private: |
43 DISALLOW_COPY_AND_ASSIGN(GLNonOwnedContext); | 43 DISALLOW_COPY_AND_ASSIGN(GLNonOwnedContext); |
44 | 44 |
45 EGLDisplay display_; | 45 EGLDisplay display_; |
46 }; | 46 }; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 // above. Low-end devices use 4444 textures so we can use a lower limit. | 142 // above. Low-end devices use 4444 textures so we can use a lower limit. |
143 limit_bytes = 8; | 143 limit_bytes = 8; |
144 } | 144 } |
145 limit_bytes = limit_bytes * 1024 * 1024; | 145 limit_bytes = limit_bytes * 1024 * 1024; |
146 } | 146 } |
147 *bytes = limit_bytes; | 147 *bytes = limit_bytes; |
148 return true; | 148 return true; |
149 } | 149 } |
150 | 150 |
151 } | 151 } |
OLD | NEW |