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

Side by Side Diff: sky/shell/gpu/ganesh_context.cc

Issue 936883002: Connect Sky and Ganesh in SkyShell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Address review comments Created 5 years, 10 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
« no previous file with comments | « sky/shell/apk/src/org/domokit/sky/shell/SkyView.java ('k') | sky/shell/gpu/ganesh_surface.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "sky/shell/gpu/ganesh_context.h" 5 #include "sky/shell/gpu/ganesh_context.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" 8 #include "third_party/skia/include/gpu/gl/GrGLInterface.h"
9 #include "ui/gl/gl_bindings_skia_in_process.h" 9 #include "ui/gl/gl_bindings_skia_in_process.h"
10 10
(...skipping 12 matching lines...) Expand all
23 } // namespace 23 } // namespace
24 24
25 GaneshContext::GaneshContext(scoped_refptr<gfx::GLContext> gl_context) 25 GaneshContext::GaneshContext(scoped_refptr<gfx::GLContext> gl_context)
26 : gl_context_(gl_context) { 26 : gl_context_(gl_context) {
27 skia::RefPtr<GrGLInterface> interface = 27 skia::RefPtr<GrGLInterface> interface =
28 skia::AdoptRef(gfx::CreateInProcessSkiaGLBinding()); 28 skia::AdoptRef(gfx::CreateInProcessSkiaGLBinding());
29 DCHECK(interface); 29 DCHECK(interface);
30 30
31 gr_context_ = skia::AdoptRef(GrContext::Create( 31 gr_context_ = skia::AdoptRef(GrContext::Create(
32 kOpenGL_GrBackend, reinterpret_cast<GrBackendContext>(interface.get()))); 32 kOpenGL_GrBackend, reinterpret_cast<GrBackendContext>(interface.get())));
33 DCHECK(gr_context_); 33 DCHECK(gr_context_) << "Failed to create GrContext.";
34 gr_context_->setResourceCacheLimits(kMaxGaneshResourceCacheCount, 34 gr_context_->setResourceCacheLimits(kMaxGaneshResourceCacheCount,
35 kMaxGaneshResourceCacheBytes); 35 kMaxGaneshResourceCacheBytes);
36 } 36 }
37 37
38 GaneshContext::~GaneshContext() { 38 GaneshContext::~GaneshContext() {
39 } 39 }
40 40
41 } // namespace shell 41 } // namespace shell
42 } // namespace sky 42 } // namespace sky
OLDNEW
« no previous file with comments | « sky/shell/apk/src/org/domokit/sky/shell/SkyView.java ('k') | sky/shell/gpu/ganesh_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698