| 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 using namespace WebCore; | 39 using namespace WebCore; |
| 40 using testing::InSequence; | 40 using testing::InSequence; |
| 41 using testing::Return; | 41 using testing::Return; |
| 42 using testing::Test; | 42 using testing::Test; |
| 43 | 43 |
| 44 | 44 |
| 45 class FakeCanvas2DLayerBridge : public Canvas2DLayerBridge { | 45 class FakeCanvas2DLayerBridge : public Canvas2DLayerBridge { |
| 46 public: | 46 public: |
| 47 FakeCanvas2DLayerBridge(PassRefPtr<GraphicsContext3D> context, PassRefPtr<Sk
DeferredCanvas> canvas) | 47 FakeCanvas2DLayerBridge(PassRefPtr<GraphicsContext3D> context, PassRefPtr<Sk
DeferredCanvas> canvas) |
| 48 : Canvas2DLayerBridge(context, canvas, NonOpaque) | 48 : Canvas2DLayerBridge(context, canvas, 0, NonOpaque) |
| 49 , m_freeableBytes(0) | 49 , m_freeableBytes(0) |
| 50 , m_freeMemoryIfPossibleCount(0) | 50 , m_freeMemoryIfPossibleCount(0) |
| 51 , m_flushCount(0) | 51 , m_flushCount(0) |
| 52 { | 52 { |
| 53 } | 53 } |
| 54 | 54 |
| 55 virtual size_t storageAllocatedForRecording() OVERRIDE | 55 virtual size_t storageAllocatedForRecording() OVERRIDE |
| 56 { | 56 { |
| 57 // Because the fake layer has no canvas to query, just | 57 // Because the fake layer has no canvas to query, just |
| 58 // return status quo. Allocation changes that would normally be | 58 // return status quo. Allocation changes that would normally be |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 flushEvictionTest(); | 253 flushEvictionTest(); |
| 254 } | 254 } |
| 255 | 255 |
| 256 TEST_F(Canvas2DLayerManagerTest, testDeferredFrame) | 256 TEST_F(Canvas2DLayerManagerTest, testDeferredFrame) |
| 257 { | 257 { |
| 258 deferredFrameTest(); | 258 deferredFrameTest(); |
| 259 } | 259 } |
| 260 | 260 |
| 261 } // namespace | 261 } // namespace |
| 262 | 262 |
| OLD | NEW |