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

Unified Diff: ui/gfx/gl/gl_context.cc

Issue 7021014: GLContext no longer holds a pointer to a GLSurface. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: ui/gfx/gl/gl_context.cc
===================================================================
--- ui/gfx/gl/gl_context.cc (revision 86168)
+++ ui/gfx/gl/gl_context.cc (working copy)
@@ -13,21 +13,8 @@
namespace gfx {
-void GLContext::ReleaseCurrent() {
- // TODO(apatrick): Implement this in GLContext derivatives.
-}
-
-GLSurface* GLContext::GetSurface() {
- // TODO(apatrick): Remove this when surfaces are split from contexts.
- return NULL;
-}
-
-unsigned int GLContext::GetBackingFrameBufferObject() {
- return 0;
-}
-
std::string GLContext::GetExtensions() {
- DCHECK(IsCurrent());
+ DCHECK(IsCurrent(NULL));
const char* ext = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS));
return std::string(ext ? ext : "");
}
@@ -42,28 +29,6 @@
return extensions.find(delimited_name) != std::string::npos;
}
-bool GLContext::InitializeCommon() {
- if (!MakeCurrent()) {
- LOG(ERROR) << "MakeCurrent failed.";
- return false;
- }
-
- if (!IsOffscreen()) {
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableGpuVsync))
- SetSwapInterval(0);
- else
- SetSwapInterval(1);
- }
-
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
- if (glGetError() != GL_NO_ERROR) {
- LOG(ERROR) << "glClear failed.";
- return false;
- }
-
- return true;
-}
-
bool GLContext::LosesAllContextsOnContextLost()
{
switch (GetGLImplementation()) {
« ui/gfx/gl/gl_context.h ('K') | « ui/gfx/gl/gl_context.h ('k') | ui/gfx/gl/gl_context_cgl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698