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

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: 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
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..30460b89588c2e792d7244fb1f509ca0e4476c51 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,
+ gfx::SurfaceConfiguration requested_configuration)
abarth-chromium 2015/06/09 00:30:21 gfx::SurfaceConfiguration -> const gfx::SurfaceCon
iansf 2015/06/09 01:52:04 Done.
: 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,
+ gfx::SurfaceConfiguration requested_configuration)
abarth-chromium 2015/06/09 00:30:21 gfx::SurfaceConfiguration -> const gfx::SurfaceCon
iansf 2015/06/09 01:52:04 Done.
: 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,

Powered by Google App Engine
This is Rietveld 408576698