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

Side by Side Diff: gpu/command_buffer/service/async_pixel_transfer_manager_egl.cc

Issue 1168993002: Update the native_viewport interface to allow specification of the surface configuration, currently… (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Final cleanups Created 5 years, 6 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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "gpu/command_buffer/service/async_pixel_transfer_manager_egl.h" 5 #include "gpu/command_buffer/service/async_pixel_transfer_manager_egl.h"
6 6
7 #include <list> 7 #include <list>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 TransferThread() : base::Thread(kAsyncTransferThreadName) { 90 TransferThread() : base::Thread(kAsyncTransferThreadName) {
91 Start(); 91 Start();
92 #if defined(OS_ANDROID) || defined(OS_LINUX) 92 #if defined(OS_ANDROID) || defined(OS_LINUX)
93 SetPriority(base::ThreadPriority::BACKGROUND); 93 SetPriority(base::ThreadPriority::BACKGROUND);
94 #endif 94 #endif
95 } 95 }
96 ~TransferThread() override { Stop(); } 96 ~TransferThread() override { Stop(); }
97 97
98 void Init() override { 98 void Init() override {
99 gfx::GLShareGroup* share_group = NULL; 99 gfx::GLShareGroup* share_group = NULL;
100 surface_ = new gfx::PbufferGLSurfaceEGL(gfx::Size(1, 1)); 100 surface_ = new gfx::PbufferGLSurfaceEGL(gfx::Size(1, 1),
101 gfx::SurfaceConfiguration());
101 surface_->Initialize(); 102 surface_->Initialize();
102 context_ = gfx::GLContext::CreateGLContext( 103 context_ = gfx::GLContext::CreateGLContext(
103 share_group, surface_.get(), gfx::PreferDiscreteGpu); 104 share_group, surface_.get(), gfx::PreferDiscreteGpu);
104 bool is_current = context_->MakeCurrent(surface_.get()); 105 bool is_current = context_->MakeCurrent(surface_.get());
105 DCHECK(is_current); 106 DCHECK(is_current);
106 } 107 }
107 108
108 void CleanUp() override { 109 void CleanUp() override {
109 surface_ = NULL; 110 surface_ = NULL;
110 context_->ReleaseCurrent(surface_.get()); 111 context_->ReleaseCurrent(surface_.get());
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 738
738 AsyncPixelTransferDelegate* 739 AsyncPixelTransferDelegate*
739 AsyncPixelTransferManagerEGL::CreatePixelTransferDelegateImpl( 740 AsyncPixelTransferManagerEGL::CreatePixelTransferDelegateImpl(
740 gles2::TextureRef* ref, 741 gles2::TextureRef* ref,
741 const AsyncTexImage2DParams& define_params) { 742 const AsyncTexImage2DParams& define_params) {
742 return new AsyncPixelTransferDelegateEGL( 743 return new AsyncPixelTransferDelegateEGL(
743 &shared_state_, ref->service_id(), define_params); 744 &shared_state_, ref->service_id(), define_params);
744 } 745 }
745 746
746 } // namespace gpu 747 } // namespace gpu
OLDNEW
« no previous file with comments | « examples/surfaces_app/surfaces_app.cc ('k') | gpu/command_buffer/service/async_pixel_transfer_manager_share_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698