| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 class SharedContextRateLimiter; | 54 class SharedContextRateLimiter; |
| 55 | 55 |
| 56 #if OS(MACOSX) | 56 #if OS(MACOSX) |
| 57 // Canvas hibernation is currently disabled on MacOS X due to a bug that causes
content loss | 57 // Canvas hibernation is currently disabled on MacOS X due to a bug that causes
content loss |
| 58 // TODO: Find a better fix for crbug.com/588434 | 58 // TODO: Find a better fix for crbug.com/588434 |
| 59 #define CANVAS2D_HIBERNATION_ENABLED 0 | 59 #define CANVAS2D_HIBERNATION_ENABLED 0 |
| 60 #else | 60 #else |
| 61 #define CANVAS2D_HIBERNATION_ENABLED 1 | 61 #define CANVAS2D_HIBERNATION_ENABLED 1 |
| 62 #endif | 62 #endif |
| 63 | 63 |
| 64 // TODO: Fix background rendering and remove this workaround. crbug.com/600386 |
| 65 #define CANVAS2D_BACKGROUND_RENDER_SWITCH_TO_CPU 0 |
| 66 |
| 64 class PLATFORM_EXPORT Canvas2DLayerBridge : public WebExternalTextureLayerClient
, public WebThread::TaskObserver, public RefCounted<Canvas2DLayerBridge> { | 67 class PLATFORM_EXPORT Canvas2DLayerBridge : public WebExternalTextureLayerClient
, public WebThread::TaskObserver, public RefCounted<Canvas2DLayerBridge> { |
| 65 WTF_MAKE_NONCOPYABLE(Canvas2DLayerBridge); | 68 WTF_MAKE_NONCOPYABLE(Canvas2DLayerBridge); |
| 66 public: | 69 public: |
| 67 enum AccelerationMode { | 70 enum AccelerationMode { |
| 68 DisableAcceleration, | 71 DisableAcceleration, |
| 69 EnableAcceleration, | 72 EnableAcceleration, |
| 70 ForceAccelerationForTesting, | 73 ForceAccelerationForTesting, |
| 71 }; | 74 }; |
| 72 | 75 |
| 73 static PassRefPtr<Canvas2DLayerBridge> create(const IntSize&, int msaaSample
Count, OpacityMode, AccelerationMode); | 76 static PassRefPtr<Canvas2DLayerBridge> create(const IntSize&, int msaaSample
Count, OpacityMode, AccelerationMode); |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 GLenum m_lastFilter; | 199 GLenum m_lastFilter; |
| 197 AccelerationMode m_accelerationMode; | 200 AccelerationMode m_accelerationMode; |
| 198 OpacityMode m_opacityMode; | 201 OpacityMode m_opacityMode; |
| 199 IntSize m_size; | 202 IntSize m_size; |
| 200 int m_recordingPixelCount; | 203 int m_recordingPixelCount; |
| 201 }; | 204 }; |
| 202 | 205 |
| 203 } // namespace blink | 206 } // namespace blink |
| 204 | 207 |
| 205 #endif | 208 #endif |
| OLD | NEW |