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

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

Issue 1804243002: Re-enable IOSurface Canvas2D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile errors from rebase, still... Created 4 years, 9 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
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 class WebGraphicsContext3D; 53 class WebGraphicsContext3D;
54 class WebGraphicsContext3DProvider; 54 class WebGraphicsContext3DProvider;
55 class SharedContextRateLimiter; 55 class SharedContextRateLimiter;
56 56
57 #if OS(MACOSX) 57 #if OS(MACOSX)
58 // Canvas hibernation is currently disabled on MacOS X due to a bug that causes content loss 58 // Canvas hibernation is currently disabled on MacOS X due to a bug that causes content loss
59 // TODO: Find a better fix for crbug.com/588434 59 // TODO: Find a better fix for crbug.com/588434
60 #define CANVAS2D_HIBERNATION_ENABLED 0 60 #define CANVAS2D_HIBERNATION_ENABLED 0
61 61
62 // IOSurfaces are a primitive only present on OS X. 62 // IOSurfaces are a primitive only present on OS X.
63 // Temporarily disable IOSurfaces while investigating a compositing bug. 63 #define USE_IOSURFACE_FOR_2D_CANVAS 1
64 // https://crbug.com/595063
65 #define USE_IOSURFACE_FOR_2D_CANVAS 0
66 #else 64 #else
67 #define CANVAS2D_HIBERNATION_ENABLED 1 65 #define CANVAS2D_HIBERNATION_ENABLED 1
68 #define USE_IOSURFACE_FOR_2D_CANVAS 0 66 #define USE_IOSURFACE_FOR_2D_CANVAS 0
69 #endif 67 #endif
70 68
71 class PLATFORM_EXPORT Canvas2DLayerBridge : public WebExternalTextureLayerClient , public WebThread::TaskObserver, public RefCounted<Canvas2DLayerBridge> { 69 class PLATFORM_EXPORT Canvas2DLayerBridge : public WebExternalTextureLayerClient , public WebThread::TaskObserver, public RefCounted<Canvas2DLayerBridge> {
72 WTF_MAKE_NONCOPYABLE(Canvas2DLayerBridge); 70 WTF_MAKE_NONCOPYABLE(Canvas2DLayerBridge);
73 public: 71 public:
74 enum AccelerationMode { 72 enum AccelerationMode {
75 DisableAcceleration, 73 DisableAcceleration,
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 // Each element in this vector represents an IOSurface backed texture that 264 // Each element in this vector represents an IOSurface backed texture that
267 // is ready to be reused. 265 // is ready to be reused.
268 // Elements in this vector can safely be purged in low memory conditions. 266 // Elements in this vector can safely be purged in low memory conditions.
269 Vector<ImageInfo> m_imageInfoCache; 267 Vector<ImageInfo> m_imageInfoCache;
270 #endif // USE_IOSURFACE_FOR_2D_CANVAS 268 #endif // USE_IOSURFACE_FOR_2D_CANVAS
271 }; 269 };
272 270
273 } // namespace blink 271 } // namespace blink
274 272
275 #endif 273 #endif
OLDNEW
« no previous file with comments | « content/test/gpu/page_sets/pixel_tests.py ('k') | third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698