| OLD | NEW |
| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 class ImageBuffer; | 60 class ImageBuffer; |
| 61 class WebGraphicsContext3DProvider; | 61 class WebGraphicsContext3DProvider; |
| 62 class SharedContextRateLimiter; | 62 class SharedContextRateLimiter; |
| 63 | 63 |
| 64 #if OS(MACOSX) | 64 #if OS(MACOSX) |
| 65 // Canvas hibernation is currently disabled on MacOS X due to a bug that causes
content loss | 65 // Canvas hibernation is currently disabled on MacOS X due to a bug that causes
content loss |
| 66 // TODO: Find a better fix for crbug.com/588434 | 66 // TODO: Find a better fix for crbug.com/588434 |
| 67 #define CANVAS2D_HIBERNATION_ENABLED 0 | 67 #define CANVAS2D_HIBERNATION_ENABLED 0 |
| 68 | 68 |
| 69 // IOSurfaces are a primitive only present on OS X. | 69 // IOSurfaces are a primitive only present on OS X. |
| 70 // IOSurfaces can't be used right now because the compositor returns them while | 70 #define USE_IOSURFACE_FOR_2D_CANVAS 1 |
| 71 // they are they still in use by the Window Server, and the SyncToken isn't | |
| 72 // relevant. https://crbug.com/608026. | |
| 73 #define USE_IOSURFACE_FOR_2D_CANVAS 0 | |
| 74 #else | 71 #else |
| 75 #define CANVAS2D_HIBERNATION_ENABLED 1 | 72 #define CANVAS2D_HIBERNATION_ENABLED 1 |
| 76 #define USE_IOSURFACE_FOR_2D_CANVAS 0 | 73 #define USE_IOSURFACE_FOR_2D_CANVAS 0 |
| 77 #endif | 74 #endif |
| 78 | 75 |
| 79 // TODO: Fix background rendering and remove this workaround. crbug.com/600386 | 76 // TODO: Fix background rendering and remove this workaround. crbug.com/600386 |
| 80 #define CANVAS2D_BACKGROUND_RENDER_SWITCH_TO_CPU 0 | 77 #define CANVAS2D_BACKGROUND_RENDER_SWITCH_TO_CPU 0 |
| 81 | 78 |
| 82 class PLATFORM_EXPORT Canvas2DLayerBridge : public WebExternalTextureLayerClient
, public WebThread::TaskObserver, public RefCounted<Canvas2DLayerBridge> { | 79 class PLATFORM_EXPORT Canvas2DLayerBridge : public WebExternalTextureLayerClient
, public WebThread::TaskObserver, public RefCounted<Canvas2DLayerBridge> { |
| 83 WTF_MAKE_NONCOPYABLE(Canvas2DLayerBridge); | 80 WTF_MAKE_NONCOPYABLE(Canvas2DLayerBridge); |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 // Each element in this vector represents an IOSurface backed texture that | 277 // Each element in this vector represents an IOSurface backed texture that |
| 281 // is ready to be reused. | 278 // is ready to be reused. |
| 282 // 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. |
| 283 Vector<ImageInfo> m_imageInfoCache; | 280 Vector<ImageInfo> m_imageInfoCache; |
| 284 #endif // USE_IOSURFACE_FOR_2D_CANVAS | 281 #endif // USE_IOSURFACE_FOR_2D_CANVAS |
| 285 }; | 282 }; |
| 286 | 283 |
| 287 } // namespace blink | 284 } // namespace blink |
| 288 | 285 |
| 289 #endif | 286 #endif |
| OLD | NEW |