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

Unified Diff: sky/shell/gpu_driver.cc

Issue 891143002: Teach SkyShell how to draw with Ganesh (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Moar comments Created 5 years, 11 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
« no previous file with comments | « sky/shell/gpu_driver.h ('k') | sky/shell/shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/shell/gpu_driver.cc
diff --git a/sky/shell/gpu_driver.cc b/sky/shell/gpu_driver.cc
deleted file mode 100644
index 3101f8e113701ba646cf24827b214b08a483369a..0000000000000000000000000000000000000000
--- a/sky/shell/gpu_driver.cc
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "sky/shell/gpu_driver.h"
-
-#include "ui/gl/gl_bindings.h"
-#include "ui/gl/gl_context.h"
-#include "ui/gl/gl_share_group.h"
-#include "ui/gl/gl_surface.h"
-
-namespace sky {
-namespace shell {
-
-GPUDriver::GPUDriver() : weak_factory_(this) {
-}
-
-GPUDriver::~GPUDriver() {
-}
-
-base::WeakPtr<GPUDriver> GPUDriver::GetWeakPtr() {
- return weak_factory_.GetWeakPtr();
-}
-
-void GPUDriver::Init(gfx::AcceleratedWidget widget) {
- share_group_ = make_scoped_refptr(new gfx::GLShareGroup());
-
- surface_ = gfx::GLSurface::CreateViewGLSurface(widget);
- CHECK(surface_) << "GLSurface required.";
-
- context_ = gfx::GLContext::CreateGLContext(share_group_.get(), surface_.get(),
- gfx::PreferIntegratedGpu);
- CHECK(context_) << "GLContext required.";
-
- CHECK(context_->MakeCurrent(surface_.get()));
-
- glClearColor(0.0, 1.0, 0.0, 0.0);
- glClear(GL_COLOR_BUFFER_BIT);
-
- surface_->SwapBuffers();
-}
-
-} // namespace shell
-} // namespace sky
« no previous file with comments | « sky/shell/gpu_driver.h ('k') | sky/shell/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698