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

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

Issue 1195513002: Use SkImage snapshots for ImageBufferSurface texture access (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments Created 5 years, 6 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 | Annotate | Revision Log
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 OwnPtr<SkDeferredCanvas> canvas = adoptPtr(SkDeferredCanvas::Create(surf ace.get())); 118 OwnPtr<SkDeferredCanvas> canvas = adoptPtr(SkDeferredCanvas::Create(surf ace.get()));
119 119
120 ::testing::Mock::VerifyAndClearExpectations(&mainMock); 120 ::testing::Mock::VerifyAndClearExpectations(&mainMock);
121 121
122 { 122 {
123 Canvas2DLayerBridgePtr bridge(adoptRef(new Canvas2DLayerBridge(mainM ockProvider.release(), canvas.release(), surface, 0, NonOpaque))); 123 Canvas2DLayerBridgePtr bridge(adoptRef(new Canvas2DLayerBridge(mainM ockProvider.release(), canvas.release(), surface, 0, NonOpaque)));
124 124
125 ::testing::Mock::VerifyAndClearExpectations(&mainMock); 125 ::testing::Mock::VerifyAndClearExpectations(&mainMock);
126 126
127 EXPECT_CALL(mainMock, flush()); 127 EXPECT_CALL(mainMock, flush());
128 unsigned textureId = bridge->getBackingTexture(); 128 unsigned textureId = bridge->getBackingTextureImage()->getTextureHan dle(true);
129 EXPECT_EQ(textureId, 0u); 129 EXPECT_EQ(textureId, 0u);
130 130
131 ::testing::Mock::VerifyAndClearExpectations(&mainMock); 131 ::testing::Mock::VerifyAndClearExpectations(&mainMock);
132 } // bridge goes out of scope here 132 } // bridge goes out of scope here
133 133
134 ::testing::Mock::VerifyAndClearExpectations(&mainMock); 134 ::testing::Mock::VerifyAndClearExpectations(&mainMock);
135 } 135 }
136 136
137 void noDrawOnContextLostTest() 137 void noDrawOnContextLostTest()
138 { 138 {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 { 230 {
231 prepareMailboxWithBitmapTest(); 231 prepareMailboxWithBitmapTest();
232 } 232 }
233 233
234 TEST_F(Canvas2DLayerBridgeTest, testPrepareMailboxAndLoseResource) 234 TEST_F(Canvas2DLayerBridgeTest, testPrepareMailboxAndLoseResource)
235 { 235 {
236 prepareMailboxAndLoseResourceTest(); 236 prepareMailboxAndLoseResourceTest();
237 } 237 }
238 238
239 } // namespace blink 239 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698