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

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

Issue 2807923002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/graphics (Closed)
Patch Set: fix typo Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/ColorSpace.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) 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 ~Canvas2DLayerBridgePtr() { Clear(); } 74 ~Canvas2DLayerBridgePtr() { Clear(); }
75 75
76 void Clear() { 76 void Clear() {
77 if (layer_bridge_) { 77 if (layer_bridge_) {
78 layer_bridge_->BeginDestruction(); 78 layer_bridge_->BeginDestruction();
79 layer_bridge_.Clear(); 79 layer_bridge_.Clear();
80 } 80 }
81 } 81 }
82 82
83 void operator=(PassRefPtr<Canvas2DLayerBridge> layer_bridge) { 83 void operator=(PassRefPtr<Canvas2DLayerBridge> layer_bridge) {
84 ASSERT(!layer_bridge_); 84 DCHECK(!layer_bridge_);
85 layer_bridge_ = layer_bridge; 85 layer_bridge_ = layer_bridge;
86 } 86 }
87 87
88 Canvas2DLayerBridge* operator->() { return layer_bridge_.Get(); } 88 Canvas2DLayerBridge* operator->() { return layer_bridge_.Get(); }
89 Canvas2DLayerBridge* Get() { return layer_bridge_.Get(); } 89 Canvas2DLayerBridge* Get() { return layer_bridge_.Get(); }
90 90
91 private: 91 private:
92 RefPtr<Canvas2DLayerBridge> layer_bridge_; 92 RefPtr<Canvas2DLayerBridge> layer_bridge_;
93 }; 93 };
94 94
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 EXPECT_FALSE(bridge->HasRecordedDrawCommands()); 1386 EXPECT_FALSE(bridge->HasRecordedDrawCommands());
1387 ::testing::Mock::VerifyAndClearExpectations(&gl); 1387 ::testing::Mock::VerifyAndClearExpectations(&gl);
1388 1388
1389 EXPECT_CALL(gl, Flush()).Times(1); 1389 EXPECT_CALL(gl, Flush()).Times(1);
1390 bridge->FlushGpu(); 1390 bridge->FlushGpu();
1391 EXPECT_FALSE(bridge->HasRecordedDrawCommands()); 1391 EXPECT_FALSE(bridge->HasRecordedDrawCommands());
1392 ::testing::Mock::VerifyAndClearExpectations(&gl); 1392 ::testing::Mock::VerifyAndClearExpectations(&gl);
1393 } 1393 }
1394 1394
1395 } // namespace blink 1395 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/ColorSpace.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698