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

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

Issue 2636973002: Adding test to verify that Canvas2DLayerBridge flushes only when required (Closed)
Patch Set: Created 3 years, 11 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 | third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp » ('j') | 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 void dontUseIdleSchedulingForTesting() { 137 void dontUseIdleSchedulingForTesting() {
138 m_dontUseIdleSchedulingForTesting = true; 138 m_dontUseIdleSchedulingForTesting = true;
139 } 139 }
140 140
141 void beginDestruction(); 141 void beginDestruction();
142 void hibernate(); 142 void hibernate();
143 bool isHibernating() const { return m_hibernationImage.get(); } 143 bool isHibernating() const { return m_hibernationImage.get(); }
144 sk_sp<SkColorSpace> colorSpace() const { return m_colorSpace; } 144 sk_sp<SkColorSpace> colorSpace() const { return m_colorSpace; }
145 SkColorType colorType() const { return m_colorType; } 145 SkColorType colorType() const { return m_colorType; }
146 146
147 bool hasRecordedDrawCommands() { return m_haveRecordedDrawCommands; }
148
147 sk_sp<SkImage> newImageSnapshot(AccelerationHint, SnapshotReason); 149 sk_sp<SkImage> newImageSnapshot(AccelerationHint, SnapshotReason);
148 150
149 // The values of the enum entries must not change because they are used for 151 // The values of the enum entries must not change because they are used for
150 // usage metrics histograms. New values can be added to the end. 152 // usage metrics histograms. New values can be added to the end.
151 enum HibernationEvent { 153 enum HibernationEvent {
152 HibernationScheduled = 0, 154 HibernationScheduled = 0,
153 HibernationAbortedDueToDestructionWhileHibernatePending = 1, 155 HibernationAbortedDueToDestructionWhileHibernatePending = 1,
154 HibernationAbortedDueToPendingDestruction = 2, 156 HibernationAbortedDueToPendingDestruction = 2,
155 HibernationAbortedDueToVisibilityChange = 3, 157 HibernationAbortedDueToVisibilityChange = 3,
156 HibernationAbortedDueGpuContextLoss = 4, 158 HibernationAbortedDueGpuContextLoss = 4,
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 // Each element in this vector represents an IOSurface backed texture that 297 // Each element in this vector represents an IOSurface backed texture that
296 // is ready to be reused. 298 // is ready to be reused.
297 // Elements in this vector can safely be purged in low memory conditions. 299 // Elements in this vector can safely be purged in low memory conditions.
298 Vector<RefPtr<ImageInfo>> m_imageInfoCache; 300 Vector<RefPtr<ImageInfo>> m_imageInfoCache;
299 #endif // USE_IOSURFACE_FOR_2D_CANVAS 301 #endif // USE_IOSURFACE_FOR_2D_CANVAS
300 }; 302 };
301 303
302 } // namespace blink 304 } // namespace blink
303 305
304 #endif 306 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698