OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 2828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2839 return 0; | 2839 return 0; |
2840 } | 2840 } |
2841 | 2841 |
2842 void Internals::resetTypeAheadSession(HTMLSelectElement* select) { | 2842 void Internals::resetTypeAheadSession(HTMLSelectElement* select) { |
2843 DCHECK(select); | 2843 DCHECK(select); |
2844 select->ResetTypeAheadSessionForTesting(); | 2844 select->ResetTypeAheadSessionForTesting(); |
2845 } | 2845 } |
2846 | 2846 |
2847 bool Internals::loseSharedGraphicsContext3D() { | 2847 bool Internals::loseSharedGraphicsContext3D() { |
2848 std::unique_ptr<WebGraphicsContext3DProvider> shared_provider = | 2848 std::unique_ptr<WebGraphicsContext3DProvider> shared_provider = |
2849 WTF::WrapUnique(Platform::Current() | 2849 Platform::Current()->CreateSharedOffscreenGraphicsContext3DProvider(); |
2850 ->CreateSharedOffscreenGraphicsContext3DProvider()); | |
2851 if (!shared_provider) | 2850 if (!shared_provider) |
2852 return false; | 2851 return false; |
2853 gpu::gles2::GLES2Interface* shared_gl = shared_provider->ContextGL(); | 2852 gpu::gles2::GLES2Interface* shared_gl = shared_provider->ContextGL(); |
2854 shared_gl->LoseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_EXT, | 2853 shared_gl->LoseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_EXT, |
2855 GL_INNOCENT_CONTEXT_RESET_EXT); | 2854 GL_INNOCENT_CONTEXT_RESET_EXT); |
2856 // To prevent tests that call loseSharedGraphicsContext3D from being | 2855 // To prevent tests that call loseSharedGraphicsContext3D from being |
2857 // flaky, we call finish so that the context is guaranteed to be lost | 2856 // flaky, we call finish so that the context is guaranteed to be lost |
2858 // synchronously (i.e. before returning). | 2857 // synchronously (i.e. before returning). |
2859 shared_gl->Finish(); | 2858 shared_gl->Finish(); |
2860 return true; | 2859 return true; |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3280 | 3279 |
3281 void Internals::crash() { | 3280 void Internals::crash() { |
3282 CHECK(false) << "Intentional crash"; | 3281 CHECK(false) << "Intentional crash"; |
3283 } | 3282 } |
3284 | 3283 |
3285 void Internals::setIsLowEndDevice(bool is_low_end_device) { | 3284 void Internals::setIsLowEndDevice(bool is_low_end_device) { |
3286 MemoryCoordinator::SetIsLowEndDeviceForTesting(is_low_end_device); | 3285 MemoryCoordinator::SetIsLowEndDeviceForTesting(is_low_end_device); |
3287 } | 3286 } |
3288 | 3287 |
3289 } // namespace blink | 3288 } // namespace blink |
OLD | NEW |