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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLContextGroup.cpp

Issue 1833273002: Remove WebGraphicsContext3D::getGLES2Interface(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: getgles2: rebase Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 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 26 matching lines...) Expand all
37 37
38 WebGLContextGroup::WebGLContextGroup() 38 WebGLContextGroup::WebGLContextGroup()
39 { 39 {
40 } 40 }
41 41
42 WebGLContextGroup::~WebGLContextGroup() 42 WebGLContextGroup::~WebGLContextGroup()
43 { 43 {
44 detachAndRemoveAllObjects(); 44 detachAndRemoveAllObjects();
45 } 45 }
46 46
47 WebGraphicsContext3D* WebGLContextGroup::getAWebGraphicsContext3D() 47 gpu::gles2::GLES2Interface* WebGLContextGroup::getAGLInterface()
48 { 48 {
49 ASSERT(!m_contexts.isEmpty()); 49 ASSERT(!m_contexts.isEmpty());
50 return (*m_contexts.begin())->webContext(); 50 return (*m_contexts.begin())->contextGL();
51 } 51 }
52 52
53 void WebGLContextGroup::addContext(WebGLRenderingContextBase* context) 53 void WebGLContextGroup::addContext(WebGLRenderingContextBase* context)
54 { 54 {
55 m_contexts.add(context); 55 m_contexts.add(context);
56 } 56 }
57 57
58 void WebGLContextGroup::removeContext(WebGLRenderingContextBase* context) 58 void WebGLContextGroup::removeContext(WebGLRenderingContextBase* context)
59 { 59 {
60 // We must call detachAndRemoveAllObjects before removing the last context. 60 // We must call detachAndRemoveAllObjects before removing the last context.
(...skipping 24 matching lines...) Expand all
85 { 85 {
86 // Detach must happen before loseContextImpl, which destroys the GraphicsCon text3D 86 // Detach must happen before loseContextImpl, which destroys the GraphicsCon text3D
87 // and prevents groupObjects from being properly deleted. 87 // and prevents groupObjects from being properly deleted.
88 detachAndRemoveAllObjects(); 88 detachAndRemoveAllObjects();
89 89
90 for (WebGLRenderingContextBase* const context : m_contexts) 90 for (WebGLRenderingContextBase* const context : m_contexts)
91 context->loseContextImpl(mode, autoRecoveryMethod); 91 context->loseContextImpl(mode, autoRecoveryMethod);
92 } 92 }
93 93
94 } // namespace blink 94 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698