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

Side by Side Diff: components/exo/display.cc

Issue 2278803003: exo: Disable RGBX fullscreen overlays. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/exo/display.h" 5 #include "components/exo/display.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/common/shell_window_ids.h" 10 #include "ash/common/shell_window_ids.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 if (!gpu_memory_buffer) { 83 if (!gpu_memory_buffer) {
84 LOG(ERROR) << "Failed to create GpuMemoryBuffer from handle"; 84 LOG(ERROR) << "Failed to create GpuMemoryBuffer from handle";
85 return nullptr; 85 return nullptr;
86 } 86 }
87 87
88 // Using zero-copy for optimal performance. 88 // Using zero-copy for optimal performance.
89 bool use_zero_copy = true; 89 bool use_zero_copy = true;
90 90
91 // List of overlay formats that are known to be supported. 91 // List of overlay formats that are known to be supported.
92 // TODO(reveman): Determine this at runtime. 92 // TODO(reveman): Determine this at runtime.
93 const gfx::BufferFormat kOverlayFormats[] = {gfx::BufferFormat::RGBA_8888, 93 // TODO(dcastagna): Re-add RGBX_8888 format.
94 gfx::BufferFormat::RGBX_8888}; 94 const gfx::BufferFormat kOverlayFormats[] = {gfx::BufferFormat::RGBA_8888};
95 bool is_overlay_candidate = 95 bool is_overlay_candidate =
96 std::find(std::begin(kOverlayFormats), std::end(kOverlayFormats), 96 std::find(std::begin(kOverlayFormats), std::end(kOverlayFormats),
97 format) != std::end(kOverlayFormats); 97 format) != std::end(kOverlayFormats);
98 98
99 return base::WrapUnique(new Buffer( 99 return base::WrapUnique(new Buffer(
100 std::move(gpu_memory_buffer), GL_TEXTURE_EXTERNAL_OES, 100 std::move(gpu_memory_buffer), GL_TEXTURE_EXTERNAL_OES,
101 // COMMANDS_COMPLETED queries are required by native pixmaps. 101 // COMMANDS_COMPLETED queries are required by native pixmaps.
102 GL_COMMANDS_COMPLETED_CHROMIUM, use_zero_copy, is_overlay_candidate)); 102 GL_COMMANDS_COMPLETED_CHROMIUM, use_zero_copy, is_overlay_candidate));
103 } 103 }
104 #endif 104 #endif
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 notification_surface_manager_->GetSurface(notification_id)) { 191 notification_surface_manager_->GetSurface(notification_id)) {
192 DLOG(ERROR) << "Invalid notification id, id=" << notification_id; 192 DLOG(ERROR) << "Invalid notification id, id=" << notification_id;
193 return nullptr; 193 return nullptr;
194 } 194 }
195 195
196 return base::MakeUnique<NotificationSurface>(notification_surface_manager_, 196 return base::MakeUnique<NotificationSurface>(notification_surface_manager_,
197 surface, notification_id); 197 surface, notification_id);
198 } 198 }
199 199
200 } // namespace exo 200 } // namespace exo
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698