summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authorccameron <ccameron@chromium.org>2015-10-26 14:35:12 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-26 21:36:08 +0000
commit3c29f968998edc5aca9f8b228196b29268938deb (patch)
tree831178c17cb0f74dd0b027ad0dc6cffcf855ac8d /content/common
parent8b1d3b2f88ad0e3fa0ddb8bebd4e67071509a258 (diff)
downloadchromium_src-3c29f968998edc5aca9f8b228196b29268938deb.zip
chromium_src-3c29f968998edc5aca9f8b228196b29268938deb.tar.gz
chromium_src-3c29f968998edc5aca9f8b228196b29268938deb.tar.bz2
Mac: Remove lots of AcceleratedWidget code
In the non-remote-CALayer model, we render to an IOSurface and pass it to the browser process, where we draw that into a CAOpenGLLayer. Delete all of the code to do that, and just set the contents of a CALayer to be that IOSurface. While we're in the neighborhood, change the software path to render into an IOSurface, and use that same path to draw it. Double-buffer the software output surface in SoftwareOutputDeviceMac, to avoid writing the next frame with the CPU while the WindowServer is drawing it (it appears that the WindowServer does not respect the IOSurface locks). BUG=546691 Review URL: https://codereview.chromium.org/1420533005 Cr-Commit-Position: refs/heads/master@{#356129}
Diffstat (limited to 'content/common')
-rw-r--r--content/common/gpu/image_transport_surface_iosurface_mac.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/content/common/gpu/image_transport_surface_iosurface_mac.cc b/content/common/gpu/image_transport_surface_iosurface_mac.cc
index 42e8300..1008a5b 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());