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

Side by Side Diff: ui/ozone/platform/drm/gpu/screen_manager_unittest.cc

Issue 2533163002: ozone: Create GbmBuffers from fourcc formats and gbm flags. (Closed)
Patch Set: Address dnicoara's comments. Created 4 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <drm_fourcc.h>
5 #include <stddef.h> 6 #include <stddef.h>
6 #include <stdint.h> 7 #include <stdint.h>
7 8
8 #include <utility> 9 #include <utility>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 #include "ui/ozone/platform/drm/gpu/crtc_controller.h" 13 #include "ui/ozone/platform/drm/gpu/crtc_controller.h"
13 #include "ui/ozone/platform/drm/gpu/drm_device_generator.h" 14 #include "ui/ozone/platform/drm/gpu/drm_device_generator.h"
14 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h" 15 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h"
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 window = screen_manager_->RemoveWindow(1); 493 window = screen_manager_->RemoveWindow(1);
493 window->Shutdown(); 494 window->Shutdown();
494 } 495 }
495 496
496 TEST_F(ScreenManagerTest, EnableControllerWhenWindowHasBuffer) { 497 TEST_F(ScreenManagerTest, EnableControllerWhenWindowHasBuffer) {
497 std::unique_ptr<ui::DrmWindow> window( 498 std::unique_ptr<ui::DrmWindow> window(
498 new ui::DrmWindow(1, device_manager_.get(), screen_manager_.get())); 499 new ui::DrmWindow(1, device_manager_.get(), screen_manager_.get()));
499 window->Initialize(buffer_generator_.get()); 500 window->Initialize(buffer_generator_.get());
500 window->SetBounds(GetPrimaryBounds()); 501 window->SetBounds(GetPrimaryBounds());
501 scoped_refptr<ui::ScanoutBuffer> buffer = buffer_generator_->Create( 502 scoped_refptr<ui::ScanoutBuffer> buffer = buffer_generator_->Create(
502 drm_, gfx::BufferFormat::BGRA_8888, GetPrimaryBounds().size()); 503 drm_, DRM_FORMAT_XRGB8888, GetPrimaryBounds().size());
tfiga 2016/12/06 07:20:37 Shouldn't the new format be DRM_FORMAT_ARGB8888?
Daniele Castagna 2016/12/06 18:31:10 At this point Chrome doesn't support overlays with
503 window->SchedulePageFlip( 504 window->SchedulePageFlip(
504 std::vector<ui::OverlayPlane>(1, ui::OverlayPlane(buffer)), 505 std::vector<ui::OverlayPlane>(1, ui::OverlayPlane(buffer)),
505 base::Bind(&EmptySwapCallback)); 506 base::Bind(&EmptySwapCallback));
506 screen_manager_->AddWindow(1, std::move(window)); 507 screen_manager_->AddWindow(1, std::move(window));
507 508
508 screen_manager_->AddDisplayController(drm_, kPrimaryCrtc, kPrimaryConnector); 509 screen_manager_->AddDisplayController(drm_, kPrimaryCrtc, kPrimaryConnector);
509 screen_manager_->ConfigureDisplayController( 510 screen_manager_->ConfigureDisplayController(
510 drm_, kPrimaryCrtc, kPrimaryConnector, GetPrimaryBounds().origin(), 511 drm_, kPrimaryCrtc, kPrimaryConnector, GetPrimaryBounds().origin(),
511 kDefaultMode); 512 kDefaultMode);
512 513
513 EXPECT_EQ(buffer->GetFramebufferId(), drm_->current_framebuffer()); 514 EXPECT_EQ(buffer->GetFramebufferId(), drm_->current_framebuffer());
514 515
515 window = screen_manager_->RemoveWindow(1); 516 window = screen_manager_->RemoveWindow(1);
516 window->Shutdown(); 517 window->Shutdown();
517 } 518 }
OLDNEW
« ui/ozone/platform/drm/gpu/drm_thread.cc ('K') | « ui/ozone/platform/drm/gpu/screen_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698