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

Side by Side Diff: cc/output/renderer_pixeltest.cc

Issue 1906423005: Replace scoped_ptr with std::unique_ptr in //media/base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-media-base: android Created 4 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 | components/audio_modem/audio_player_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <memory>
7 8
8 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
9 #include "cc/output/gl_renderer.h" 10 #include "cc/output/gl_renderer.h"
10 #include "cc/quads/draw_quad.h" 11 #include "cc/quads/draw_quad.h"
11 #include "cc/quads/picture_draw_quad.h" 12 #include "cc/quads/picture_draw_quad.h"
12 #include "cc/quads/texture_draw_quad.h" 13 #include "cc/quads/texture_draw_quad.h"
13 #include "cc/resources/video_resource_updater.h" 14 #include "cc/resources/video_resource_updater.h"
14 #include "cc/test/fake_raster_source.h" 15 #include "cc/test/fake_raster_source.h"
15 #include "cc/test/fake_recording_source.h" 16 #include "cc/test/fake_recording_source.h"
16 #include "cc/test/pixel_test.h" 17 #include "cc/test/pixel_test.h"
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 1208
1208 EXPECT_TRUE(this->RunPixelTest(&pass_list, 1209 EXPECT_TRUE(this->RunPixelTest(&pass_list,
1209 base::FilePath(FILE_PATH_LITERAL("green.png")), 1210 base::FilePath(FILE_PATH_LITERAL("green.png")),
1210 FuzzyPixelOffByOneComparator(true))); 1211 FuzzyPixelOffByOneComparator(true)));
1211 } 1212 }
1212 1213
1213 TEST_F(VideoGLRendererPixelTest, SimpleNV12JRect) { 1214 TEST_F(VideoGLRendererPixelTest, SimpleNV12JRect) {
1214 gfx::Rect rect(this->device_viewport_size_); 1215 gfx::Rect rect(this->device_viewport_size_);
1215 1216
1216 RenderPassId id(1, 1); 1217 RenderPassId id(1, 1);
1217 scoped_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect); 1218 std::unique_ptr<RenderPass> pass = CreateTestRootRenderPass(id, rect);
1218 1219
1219 SharedQuadState* shared_state = 1220 SharedQuadState* shared_state =
1220 CreateTestSharedQuadState(gfx::Transform(), rect, pass.get()); 1221 CreateTestSharedQuadState(gfx::Transform(), rect, pass.get());
1221 1222
1222 // YUV of (149,43,21) should be green (0,255,0) in RGB. 1223 // YUV of (149,43,21) should be green (0,255,0) in RGB.
1223 CreateTestYUVVideoDrawQuad_NV12( 1224 CreateTestYUVVideoDrawQuad_NV12(
1224 shared_state, media::COLOR_SPACE_JPEG, gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f), 1225 shared_state, media::COLOR_SPACE_JPEG, gfx::RectF(0.0f, 0.0f, 1.0f, 1.0f),
1225 149, 43, 21, pass.get(), rect, rect, resource_provider_.get()); 1226 149, 43, 21, pass.get(), rect, rect, resource_provider_.get());
1226 1227
1227 RenderPassList pass_list; 1228 RenderPassList pass_list;
(...skipping 1949 matching lines...) Expand 10 before | Expand all | Expand 10 after
3177 3178
3178 EXPECT_TRUE(this->RunPixelTest( 3179 EXPECT_TRUE(this->RunPixelTest(
3179 &pass_list, base::FilePath(FILE_PATH_LITERAL("spiral.png")), 3180 &pass_list, base::FilePath(FILE_PATH_LITERAL("spiral.png")),
3180 FuzzyPixelOffByOneComparator(true))); 3181 FuzzyPixelOffByOneComparator(true)));
3181 } 3182 }
3182 3183
3183 #endif // !defined(OS_ANDROID) 3184 #endif // !defined(OS_ANDROID)
3184 3185
3185 } // namespace 3186 } // namespace
3186 } // namespace cc 3187 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | components/audio_modem/audio_player_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698