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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp

Issue 1916703002: Prepare for move-only PassOwnPtr in the remaining directories. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@core1
Patch Set: Merge with trunk. Created 4 years, 8 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 return nullptr; 148 return nullptr;
149 } 149 }
150 }; 150 };
151 151
152 } // anonymous namespace 152 } // anonymous namespace
153 153
154 class Canvas2DLayerBridgeTest : public Test { 154 class Canvas2DLayerBridgeTest : public Test {
155 public: 155 public:
156 PassRefPtr<Canvas2DLayerBridge> makeBridge(PassOwnPtr<FakeWebGraphicsContext 3DProvider> provider, const IntSize& size, Canvas2DLayerBridge::AccelerationMode accelerationMode) 156 PassRefPtr<Canvas2DLayerBridge> makeBridge(PassOwnPtr<FakeWebGraphicsContext 3DProvider> provider, const IntSize& size, Canvas2DLayerBridge::AccelerationMode accelerationMode)
157 { 157 {
158 return adoptRef(new Canvas2DLayerBridge(provider, size, 0, NonOpaque, ac celerationMode)); 158 return adoptRef(new Canvas2DLayerBridge(std::move(provider), size, 0, No nOpaque, accelerationMode));
159 } 159 }
160 160
161 protected: 161 protected:
162 void fullLifecycleTest() 162 void fullLifecycleTest()
163 { 163 {
164 FakeGLES2Interface gl; 164 FakeGLES2Interface gl;
165 OwnPtr<FakeWebGraphicsContext3DProvider> contextProvider = adoptPtr(new FakeWebGraphicsContext3DProvider(&gl)); 165 OwnPtr<FakeWebGraphicsContext3DProvider> contextProvider = adoptPtr(new FakeWebGraphicsContext3DProvider(&gl));
166 166
167 Canvas2DLayerBridgePtr bridge(adoptRef(new Canvas2DLayerBridge(contextPr ovider.release(), IntSize(300, 150), 0, NonOpaque, Canvas2DLayerBridge::DisableA cceleration))); 167 Canvas2DLayerBridgePtr bridge(adoptRef(new Canvas2DLayerBridge(contextPr ovider.release(), IntSize(300, 150), 0, NonOpaque, Canvas2DLayerBridge::DisableA cceleration)));
168 168
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 WebExternalTextureMailbox mailbox; 1046 WebExternalTextureMailbox mailbox;
1047 EXPECT_FALSE(bridge->prepareMailbox(&mailbox, 0)); 1047 EXPECT_FALSE(bridge->prepareMailbox(&mailbox, 0));
1048 EXPECT_TRUE(bridge->checkSurfaceValid()); 1048 EXPECT_TRUE(bridge->checkSurfaceValid());
1049 1049
1050 // Tear down the bridge on the thread so that 'bridge' can go out of scope 1050 // Tear down the bridge on the thread so that 'bridge' can go out of scope
1051 // without crashing due to thread checks 1051 // without crashing due to thread checks
1052 postAndWaitDestroyBridgeTask(BLINK_FROM_HERE, testThread.get(), &bridge); 1052 postAndWaitDestroyBridgeTask(BLINK_FROM_HERE, testThread.get(), &bridge);
1053 } 1053 }
1054 1054
1055 } // namespace blink 1055 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698