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

Side by Side Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp

Issue 2007983006: Rename OwnPtr::clear() to reset() in modules/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 "modules/canvas2d/CanvasRenderingContext2D.h" 5 #include "modules/canvas2d/CanvasRenderingContext2D.h"
6 6
7 #include "core/fetch/MemoryCache.h" 7 #include "core/fetch/MemoryCache.h"
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/frame/ImageBitmap.h" 9 #include "core/frame/ImageBitmap.h"
10 #include "core/html/HTMLCanvasElement.h" 10 #include "core/html/HTMLCanvasElement.h"
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 OwnPtr<ImageBuffer> imageBuffer2 = ImageBuffer::create(std::move(fakeAcceler ateSurface2)); 708 OwnPtr<ImageBuffer> imageBuffer2 = ImageBuffer::create(std::move(fakeAcceler ateSurface2));
709 EXPECT_EQ(800, getCurrentGPUMemoryUsage()); 709 EXPECT_EQ(800, getCurrentGPUMemoryUsage());
710 EXPECT_EQ(1200, getGlobalGPUMemoryUsage()); 710 EXPECT_EQ(1200, getGlobalGPUMemoryUsage());
711 711
712 // Tear down the first image buffer that resides in current canvas element 712 // Tear down the first image buffer that resides in current canvas element
713 canvasElement().setSize(IntSize(20, 20)); 713 canvasElement().setSize(IntSize(20, 20));
714 Mock::VerifyAndClearExpectations(fakeAccelerateSurfacePtr); 714 Mock::VerifyAndClearExpectations(fakeAccelerateSurfacePtr);
715 EXPECT_EQ(400, getGlobalGPUMemoryUsage()); 715 EXPECT_EQ(400, getGlobalGPUMemoryUsage());
716 716
717 // Tear down the second image buffer 717 // Tear down the second image buffer
718 imageBuffer2.clear(); 718 imageBuffer2.reset();
719 EXPECT_EQ(0, getGlobalGPUMemoryUsage()); 719 EXPECT_EQ(0, getGlobalGPUMemoryUsage());
720 } 720 }
721 721
722 } // namespace blink 722 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698