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

Unified Diff: services/gles2/command_buffer_driver.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/gles2/command_buffer_driver.h ('k') | services/gles2/gpu_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/gles2/command_buffer_driver.cc
diff --git a/services/gles2/command_buffer_driver.cc b/services/gles2/command_buffer_driver.cc
index 50d1b9761837b103cfde6748cbd3cd0053a4f050..6ba980f01fc3b7ca8047bf088ec6e4ce1b891fe1 100644
--- a/services/gles2/command_buffer_driver.cc
+++ b/services/gles2/command_buffer_driver.cc
@@ -53,23 +53,27 @@ CommandBufferDriver::Client::~Client() {
CommandBufferDriver::CommandBufferDriver(
gfx::GLShareGroup* share_group,
gpu::gles2::MailboxManager* mailbox_manager,
- gpu::SyncPointManager* sync_point_manager)
+ gpu::SyncPointManager* sync_point_manager,
+ const gfx::SurfaceConfiguration& requested_configuration)
: CommandBufferDriver(gfx::kNullAcceleratedWidget,
share_group,
mailbox_manager,
- sync_point_manager) {
+ sync_point_manager,
+ requested_configuration) {
}
CommandBufferDriver::CommandBufferDriver(
gfx::AcceleratedWidget widget,
gfx::GLShareGroup* share_group,
gpu::gles2::MailboxManager* mailbox_manager,
- gpu::SyncPointManager* sync_point_manager)
+ gpu::SyncPointManager* sync_point_manager,
+ const gfx::SurfaceConfiguration& requested_configuration)
: client_(nullptr),
widget_(widget),
share_group_(share_group),
mailbox_manager_(mailbox_manager),
sync_point_manager_(sync_point_manager),
+ requested_configuration_(requested_configuration),
weak_factory_(this) {
}
@@ -96,9 +100,11 @@ void CommandBufferDriver::Initialize(
bool CommandBufferDriver::DoInitialize(
mojo::ScopedSharedBufferHandle shared_state) {
if (widget_ == gfx::kNullAcceleratedWidget)
- surface_ = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1));
+ surface_ = gfx::GLSurface::CreateOffscreenGLSurface(
+ gfx::Size(1, 1), requested_configuration_);
else {
- surface_ = gfx::GLSurface::CreateViewGLSurface(widget_);
+ surface_ =
+ gfx::GLSurface::CreateViewGLSurface(widget_, requested_configuration_);
if (auto vsync_provider = surface_->GetVSyncProvider()) {
vsync_provider->GetVSyncParameters(
base::Bind(&CommandBufferDriver::OnUpdateVSyncParameters,
« no previous file with comments | « services/gles2/command_buffer_driver.h ('k') | services/gles2/gpu_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698