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

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

Issue 2093603002: Wrap non-GCed raw pointer parameters of WTF::bind with WTF::unretained (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unretained_wrapper
Patch Set: rebase Created 4 years, 5 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/graphics/RecordingImageBufferSurface.h" 5 #include "platform/graphics/RecordingImageBufferSurface.h"
6 6
7 #include "platform/graphics/GraphicsContext.h" 7 #include "platform/graphics/GraphicsContext.h"
8 #include "platform/graphics/ImageBuffer.h" 8 #include "platform/graphics/ImageBuffer.h"
9 #include "platform/graphics/ImageBufferClient.h" 9 #include "platform/graphics/ImageBufferClient.h"
10 #include "platform/graphics/UnacceleratedImageBufferSurface.h" 10 #include "platform/graphics/UnacceleratedImageBufferSurface.h"
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 }; 337 };
338 338
339 CurrentThreadMock m_currentThread; 339 CurrentThreadMock m_currentThread;
340 }; 340 };
341 341
342 } // anonymous namespace 342 } // anonymous namespace
343 343
344 #define CALL_TEST_TASK_WRAPPER(TEST_METHOD) \ 344 #define CALL_TEST_TASK_WRAPPER(TEST_METHOD) \
345 { \ 345 { \
346 CurrentThreadPlatformMock ctpm; \ 346 CurrentThreadPlatformMock ctpm; \
347 Platform::current()->currentThread()->getWebTaskRunner()->postTask(BLINK _FROM_HERE, bind(&RecordingImageBufferSurfaceTest::TEST_METHOD, this)); \ 347 Platform::current()->currentThread()->getWebTaskRunner()->postTask(BLINK _FROM_HERE, bind(&RecordingImageBufferSurfaceTest::TEST_METHOD, WTF::unretained( this))); \
348 ctpm.enterRunLoop(); \ 348 ctpm.enterRunLoop(); \
349 } 349 }
350 350
351 TEST_F(RecordingImageBufferSurfaceTest, testEmptyPicture) 351 TEST_F(RecordingImageBufferSurfaceTest, testEmptyPicture)
352 { 352 {
353 testEmptyPicture(); 353 testEmptyPicture();
354 } 354 }
355 355
356 TEST_F(RecordingImageBufferSurfaceTest, testNoFallbackWithClear) 356 TEST_F(RecordingImageBufferSurfaceTest, testNoFallbackWithClear)
357 { 357 {
(...skipping 26 matching lines...) Expand all
384 expectDisplayListEnabled(true); 384 expectDisplayListEnabled(true);
385 } 385 }
386 386
387 TEST_F(RecordingImageBufferSurfaceTest, testClearRect) 387 TEST_F(RecordingImageBufferSurfaceTest, testClearRect)
388 { 388 {
389 CALL_TEST_TASK_WRAPPER(testClearRect); 389 CALL_TEST_TASK_WRAPPER(testClearRect);
390 expectDisplayListEnabled(true); 390 expectDisplayListEnabled(true);
391 } 391 }
392 392
393 } // namespace blink 393 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698