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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h

Issue 1953293005: [Merge to 2704] Turn off IOSurface implementation for Canvas2D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 class WebGraphicsContext3D; 59 class WebGraphicsContext3D;
60 class WebGraphicsContext3DProvider; 60 class WebGraphicsContext3DProvider;
61 class SharedContextRateLimiter; 61 class SharedContextRateLimiter;
62 62
63 #if OS(MACOSX) 63 #if OS(MACOSX)
64 // Canvas hibernation is currently disabled on MacOS X due to a bug that causes content loss 64 // Canvas hibernation is currently disabled on MacOS X due to a bug that causes content loss
65 // TODO: Find a better fix for crbug.com/588434 65 // TODO: Find a better fix for crbug.com/588434
66 #define CANVAS2D_HIBERNATION_ENABLED 0 66 #define CANVAS2D_HIBERNATION_ENABLED 0
67 67
68 // IOSurfaces are a primitive only present on OS X. 68 // IOSurfaces are a primitive only present on OS X.
69 #define USE_IOSURFACE_FOR_2D_CANVAS 1 69 // IOSurfaces can't be used right now because the compositor returns them while
70 // they are they still in use by the Window Server, and the SyncToken isn't
71 // relevant. https://crbug.com/608026.
72 #define USE_IOSURFACE_FOR_2D_CANVAS 0
70 #else 73 #else
71 #define CANVAS2D_HIBERNATION_ENABLED 1 74 #define CANVAS2D_HIBERNATION_ENABLED 1
72 #define USE_IOSURFACE_FOR_2D_CANVAS 0 75 #define USE_IOSURFACE_FOR_2D_CANVAS 0
73 #endif 76 #endif
74 77
75 // TODO: Fix background rendering and remove this workaround. crbug.com/600386 78 // TODO: Fix background rendering and remove this workaround. crbug.com/600386
76 #define CANVAS2D_BACKGROUND_RENDER_SWITCH_TO_CPU 0 79 #define CANVAS2D_BACKGROUND_RENDER_SWITCH_TO_CPU 0
77 80
78 class PLATFORM_EXPORT Canvas2DLayerBridge : public WebExternalTextureLayerClient , public WebThread::TaskObserver, public RefCounted<Canvas2DLayerBridge> { 81 class PLATFORM_EXPORT Canvas2DLayerBridge : public WebExternalTextureLayerClient , public WebThread::TaskObserver, public RefCounted<Canvas2DLayerBridge> {
79 WTF_MAKE_NONCOPYABLE(Canvas2DLayerBridge); 82 WTF_MAKE_NONCOPYABLE(Canvas2DLayerBridge);
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 // Each element in this vector represents an IOSurface backed texture that 277 // Each element in this vector represents an IOSurface backed texture that
275 // is ready to be reused. 278 // is ready to be reused.
276 // Elements in this vector can safely be purged in low memory conditions. 279 // Elements in this vector can safely be purged in low memory conditions.
277 Vector<ImageInfo> m_imageInfoCache; 280 Vector<ImageInfo> m_imageInfoCache;
278 #endif // USE_IOSURFACE_FOR_2D_CANVAS 281 #endif // USE_IOSURFACE_FOR_2D_CANVAS
279 }; 282 };
280 283
281 } // namespace blink 284 } // namespace blink
282 285
283 #endif 286 #endif
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