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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTestHelpers.h

Issue 2956583002: Removed usage of RefPtr::Release in unit tests (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "gpu/command_buffer/common/capabilities.h" 5 #include "gpu/command_buffer/common/capabilities.h"
6 #include "platform/RuntimeEnabledFeatures.h" 6 #include "platform/RuntimeEnabledFeatures.h"
7 #include "platform/graphics/CanvasColorParams.h" 7 #include "platform/graphics/CanvasColorParams.h"
8 #include "platform/graphics/gpu/DrawingBuffer.h" 8 #include "platform/graphics/gpu/DrawingBuffer.h"
9 #include "platform/graphics/gpu/Extensions3DUtil.h" 9 #include "platform/graphics/gpu/Extensions3DUtil.h"
10 #include "public/platform/WebGraphicsContext3DProvider.h" 10 #include "public/platform/WebGraphicsContext3DProvider.h"
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 Extensions3DUtil::Create(context_provider->ContextGL()); 378 Extensions3DUtil::Create(context_provider->ContextGL());
379 RefPtr<DrawingBufferForTests> drawing_buffer = 379 RefPtr<DrawingBufferForTests> drawing_buffer =
380 AdoptRef(new DrawingBufferForTests(std::move(context_provider), 380 AdoptRef(new DrawingBufferForTests(std::move(context_provider),
381 std::move(extensions_util), client, 381 std::move(extensions_util), client,
382 preserve)); 382 preserve));
383 if (!drawing_buffer->Initialize( 383 if (!drawing_buffer->Initialize(
384 size, use_multisampling != kDisableMultisampling)) { 384 size, use_multisampling != kDisableMultisampling)) {
385 drawing_buffer->BeginDestruction(); 385 drawing_buffer->BeginDestruction();
386 return nullptr; 386 return nullptr;
387 } 387 }
388 return drawing_buffer.Release(); 388 return drawing_buffer;
389 } 389 }
390 390
391 DrawingBufferForTests( 391 DrawingBufferForTests(
392 std::unique_ptr<WebGraphicsContext3DProvider> context_provider, 392 std::unique_ptr<WebGraphicsContext3DProvider> context_provider,
393 std::unique_ptr<Extensions3DUtil> extensions_util, 393 std::unique_ptr<Extensions3DUtil> extensions_util,
394 DrawingBuffer::Client* client, 394 DrawingBuffer::Client* client,
395 PreserveDrawingBuffer preserve) 395 PreserveDrawingBuffer preserve)
396 : DrawingBuffer( 396 : DrawingBuffer(
397 std::move(context_provider), 397 std::move(context_provider),
398 std::move(extensions_util), 398 std::move(extensions_util),
(...skipping 17 matching lines...) Expand all
416 GLES2InterfaceForTests* ContextGLForTests() { 416 GLES2InterfaceForTests* ContextGLForTests() {
417 return static_cast<GLES2InterfaceForTests*>(ContextGL()); 417 return static_cast<GLES2InterfaceForTests*>(ContextGL());
418 } 418 }
419 419
420 bool* live_; 420 bool* live_;
421 421
422 int RecycledBitmapCount() { return recycled_bitmaps_.size(); } 422 int RecycledBitmapCount() { return recycled_bitmaps_.size(); }
423 }; 423 };
424 424
425 } // blink 425 } // blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698