| 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 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 using namespace WebCore; | 37 using namespace WebCore; |
| 38 using testing::InSequence; | 38 using testing::InSequence; |
| 39 using testing::Return; | 39 using testing::Return; |
| 40 using testing::Test; | 40 using testing::Test; |
| 41 | 41 |
| 42 | 42 |
| 43 class FakeCanvas2DLayerBridge : public Canvas2DLayerBridge { | 43 class FakeCanvas2DLayerBridge : public Canvas2DLayerBridge { |
| 44 public: | 44 public: |
| 45 FakeCanvas2DLayerBridge(PassRefPtr<GraphicsContext3D> context, SkDeferredCan
vas* canvas) | 45 FakeCanvas2DLayerBridge(PassRefPtr<GraphicsContext3D> context, SkDeferredCan
vas* canvas) |
| 46 : Canvas2DLayerBridge(context, canvas, SingleThread) | 46 : Canvas2DLayerBridge(context, canvas, NonOpaque, SingleThread) |
| 47 , m_freeableBytes(0) | 47 , m_freeableBytes(0) |
| 48 , m_freeMemoryIfPossibleCount(0) | 48 , m_freeMemoryIfPossibleCount(0) |
| 49 , m_flushCount(0) | 49 , m_flushCount(0) |
| 50 { | 50 { |
| 51 } | 51 } |
| 52 | 52 |
| 53 virtual size_t storageAllocatedForRecording() OVERRIDE | 53 virtual size_t storageAllocatedForRecording() OVERRIDE |
| 54 { | 54 { |
| 55 // Because the fake layer has no canvas to query, just | 55 // Because the fake layer has no canvas to query, just |
| 56 // return status quo. Allocation changes that would normally be | 56 // return status quo. Allocation changes that would normally be |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 flushEvictionTest(); | 256 flushEvictionTest(); |
| 257 } | 257 } |
| 258 | 258 |
| 259 TEST_F(Canvas2DLayerManagerTest, testDeferredFrame) | 259 TEST_F(Canvas2DLayerManagerTest, testDeferredFrame) |
| 260 { | 260 { |
| 261 deferredFrameTest(); | 261 deferredFrameTest(); |
| 262 } | 262 } |
| 263 | 263 |
| 264 } // namespace | 264 } // namespace |
| 265 | 265 |
| OLD | NEW |