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

Unified Diff: content/common/gpu/image_transport_surface_iosurface_mac.cc

Issue 1420533005: Mac: Kill lots of AcceleratedWidget code (with fire) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback 2 Created 5 years, 2 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 | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | ui/accelerated_widget_mac/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/image_transport_surface_iosurface_mac.cc
diff --git a/content/common/gpu/image_transport_surface_iosurface_mac.cc b/content/common/gpu/image_transport_surface_iosurface_mac.cc
index 42e8300d333e9b6668e42fde254cfcdcc310b3ff..1008a5b7f77633a99cd46fbdbc8361bbce492c35 100644
--- a/content/common/gpu/image_transport_surface_iosurface_mac.cc
+++ b/content/common/gpu/image_transport_surface_iosurface_mac.cc
@@ -12,7 +12,7 @@ namespace {
// IOSurface dimensions will be rounded up to a multiple of this value in order
// to reduce memory thrashing during resize. This must be a power of 2.
-const uint32 kIOSurfaceDimensionRoundup = 64;
+const uint32 kIOSurfaceDimensionRoundup = 1;
int RoundUpSurfaceDimension(int number) {
DCHECK(number >= 0);
@@ -59,11 +59,13 @@ bool IOSurfaceStorageProvider::AllocateColorBufferStorage(
GLuint texture, gfx::Size pixel_size, float scale_factor) {
// Allocate a new IOSurface, which is the GPU resource that can be
// shared across processes.
+ unsigned pixel_format = 'BGRA';
base::ScopedCFTypeRef<CFMutableDictionaryRef> properties;
properties.reset(CFDictionaryCreateMutable(kCFAllocatorDefault,
0,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks));
+ AddIntegerValue(properties, kIOSurfacePixelFormat, pixel_format);
AddIntegerValue(properties,
kIOSurfaceWidth,
pixel_size.width());
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | ui/accelerated_widget_mac/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698