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

Side by Side Diff: ui/ozone/platform/dri/dri_window_delegate_impl.cc

Issue 959953002: [Ozone-Dri] Do not call AddFramebuffer with cursor buffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 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 "ui/ozone/platform/dri/dri_window_delegate_impl.h" 5 #include "ui/ozone/platform/dri/dri_window_delegate_impl.h"
6 6
7 #include "base/trace_event/trace_event.h" 7 #include "base/trace_event/trace_event.h"
8 #include "third_party/skia/include/core/SkBitmap.h" 8 #include "third_party/skia/include/core/SkBitmap.h"
9 #include "third_party/skia/include/core/SkDevice.h" 9 #include "third_party/skia/include/core/SkDevice.h"
10 #include "third_party/skia/include/core/SkSurface.h" 10 #include "third_party/skia/include/core/SkSurface.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 device_manager_->GetDrmDevice(gfx::kNullAcceleratedWidget); 67 device_manager_->GetDrmDevice(gfx::kNullAcceleratedWidget);
68 68
69 uint64_t cursor_width = 64; 69 uint64_t cursor_width = 64;
70 uint64_t cursor_height = 64; 70 uint64_t cursor_height = 64;
71 drm->GetCapability(DRM_CAP_CURSOR_WIDTH, &cursor_width); 71 drm->GetCapability(DRM_CAP_CURSOR_WIDTH, &cursor_width);
72 drm->GetCapability(DRM_CAP_CURSOR_HEIGHT, &cursor_height); 72 drm->GetCapability(DRM_CAP_CURSOR_HEIGHT, &cursor_height);
73 73
74 SkImageInfo info = SkImageInfo::MakeN32Premul(cursor_width, cursor_height); 74 SkImageInfo info = SkImageInfo::MakeN32Premul(cursor_width, cursor_height);
75 for (size_t i = 0; i < arraysize(cursor_buffers_); ++i) { 75 for (size_t i = 0; i < arraysize(cursor_buffers_); ++i) {
76 cursor_buffers_[i] = new DriBuffer(drm); 76 cursor_buffers_[i] = new DriBuffer(drm);
77 if (!cursor_buffers_[i]->Initialize(info)) { 77 if (!cursor_buffers_[i]->Initialize(info, false)) {
78 LOG(ERROR) << "Failed to initialize cursor buffer"; 78 LOG(ERROR) << "Failed to initialize cursor buffer";
79 return; 79 return;
80 } 80 }
81 } 81 }
82 } 82 }
83 83
84 void DriWindowDelegateImpl::Shutdown() { 84 void DriWindowDelegateImpl::Shutdown() {
85 TRACE_EVENT1("dri", "DriWindowDelegateImpl::Shutdown", "widget", widget_); 85 TRACE_EVENT1("dri", "DriWindowDelegateImpl::Shutdown", "widget", widget_);
86 screen_manager_->RemoveObserver(this); 86 screen_manager_->RemoveObserver(this);
87 device_manager_->RemoveDrmDevice(widget_); 87 device_manager_->RemoveDrmDevice(widget_);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 void DriWindowDelegateImpl::UpdateWidgetToDrmDeviceMapping() { 193 void DriWindowDelegateImpl::UpdateWidgetToDrmDeviceMapping() {
194 scoped_refptr<DriWrapper> drm = nullptr; 194 scoped_refptr<DriWrapper> drm = nullptr;
195 if (controller_) 195 if (controller_)
196 drm = controller_->GetAllocationDriWrapper(); 196 drm = controller_->GetAllocationDriWrapper();
197 197
198 device_manager_->UpdateDrmDevice(widget_, drm); 198 device_manager_->UpdateDrmDevice(widget_, drm);
199 } 199 }
200 200
201 } // namespace ui 201 } // namespace ui
OLDNEW
« ui/ozone/platform/dri/dri_buffer.cc ('K') | « ui/ozone/platform/dri/dri_surface_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698