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

Side by Side Diff: Source/core/platform/graphics/chromium/Canvas2DLayerBridgeTest.cpp

Issue 26541008: Web setting for canvas2d msaa (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix C2DLayer tests Created 7 years, 2 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 }; 54 };
55 55
56 class FakeCanvas2DLayerBridge : public Canvas2DLayerBridge { 56 class FakeCanvas2DLayerBridge : public Canvas2DLayerBridge {
57 public: 57 public:
58 static PassRefPtr<Canvas2DLayerBridge> create(PassRefPtr<GraphicsContext3D> context, PassRefPtr<SkDeferredCanvas> canvas, OpacityMode opacityMode) 58 static PassRefPtr<Canvas2DLayerBridge> create(PassRefPtr<GraphicsContext3D> context, PassRefPtr<SkDeferredCanvas> canvas, OpacityMode opacityMode)
59 { 59 {
60 return adoptRef(static_cast<Canvas2DLayerBridge*>(new FakeCanvas2DLayerB ridge(context, canvas, opacityMode))); 60 return adoptRef(static_cast<Canvas2DLayerBridge*>(new FakeCanvas2DLayerB ridge(context, canvas, opacityMode)));
61 } 61 }
62 protected: 62 protected:
63 FakeCanvas2DLayerBridge(PassRefPtr<GraphicsContext3D> context, PassRefPtr<Sk DeferredCanvas> canvas, OpacityMode opacityMode) : 63 FakeCanvas2DLayerBridge(PassRefPtr<GraphicsContext3D> context, PassRefPtr<Sk DeferredCanvas> canvas, OpacityMode opacityMode) :
64 Canvas2DLayerBridge(context, canvas, opacityMode) 64 Canvas2DLayerBridge(context, canvas, 0, opacityMode)
65 { } 65 { }
66 }; 66 };
67 67
68 } // namespace 68 } // namespace
69 69
70 class Canvas2DLayerBridgeTest : public Test { 70 class Canvas2DLayerBridgeTest : public Test {
71 protected: 71 protected:
72 void fullLifecycleTest() 72 void fullLifecycleTest()
73 { 73 {
74 RefPtr<GraphicsContext3D> mainContext = GraphicsContext3D::createGraphic sContextFromWebContext(adoptPtr(new MockCanvasContext)); 74 RefPtr<GraphicsContext3D> mainContext = GraphicsContext3D::createGraphic sContextFromWebContext(adoptPtr(new MockCanvasContext));
(...skipping 21 matching lines...) Expand all
96 }; 96 };
97 97
98 namespace { 98 namespace {
99 99
100 TEST_F(Canvas2DLayerBridgeTest, testFullLifecycleSingleThreaded) 100 TEST_F(Canvas2DLayerBridgeTest, testFullLifecycleSingleThreaded)
101 { 101 {
102 fullLifecycleTest(); 102 fullLifecycleTest();
103 } 103 }
104 104
105 } // namespace 105 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698