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

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: Fix native build 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
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..9c01d4fb2071b4cf2ea538970866cb6cc109abb5 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.
+ int pixel_format = 'BGRA';
tapted 2015/10/22 08:26:50 nit: unsigned?
ccameron 2015/10/22 19:26:11 Done.
base::ScopedCFTypeRef<CFMutableDictionaryRef> properties;
properties.reset(CFDictionaryCreateMutable(kCFAllocatorDefault,
0,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks));
+ AddIntegerValue(properties, kIOSurfacePixelFormat, pixel_format);
AddIntegerValue(properties,
kIOSurfaceWidth,
pixel_size.width());

Powered by Google App Engine
This is Rietveld 408576698