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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_browsertest.cc

Issue 382623002: SkBitmap::Config is no more, use SkColorType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missed some for chromeos and win Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/message_loop/message_loop_proxy.h" 6 #include "base/message_loop/message_loop_proxy.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "content/browser/gpu/compositor_util.h" 9 #include "content/browser/gpu/compositor_util.h"
10 #include "content/browser/gpu/gpu_data_manager_impl.h" 10 #include "content/browser/gpu/gpu_data_manager_impl.h"
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 EXPECT_EQ(expected_copy_from_compositing_surface_result_, result); 422 EXPECT_EQ(expected_copy_from_compositing_surface_result_, result);
423 if (!result) { 423 if (!result) {
424 quit_callback.Run(); 424 quit_callback.Run();
425 return; 425 return;
426 } 426 }
427 427
428 const SkBitmap& expected_bitmap = 428 const SkBitmap& expected_bitmap =
429 expected_copy_from_compositing_surface_bitmap_; 429 expected_copy_from_compositing_surface_bitmap_;
430 EXPECT_EQ(expected_bitmap.width(), bitmap.width()); 430 EXPECT_EQ(expected_bitmap.width(), bitmap.width());
431 EXPECT_EQ(expected_bitmap.height(), bitmap.height()); 431 EXPECT_EQ(expected_bitmap.height(), bitmap.height());
432 EXPECT_EQ(expected_bitmap.config(), bitmap.config()); 432 EXPECT_EQ(expected_bitmap.colorType(), bitmap.colorType());
433 SkAutoLockPixels expected_bitmap_lock(expected_bitmap); 433 SkAutoLockPixels expected_bitmap_lock(expected_bitmap);
434 SkAutoLockPixels bitmap_lock(bitmap); 434 SkAutoLockPixels bitmap_lock(bitmap);
435 int fails = 0; 435 int fails = 0;
436 for (int i = 0; i < bitmap.width() && fails < 10; ++i) { 436 for (int i = 0; i < bitmap.width() && fails < 10; ++i) {
437 for (int j = 0; j < bitmap.height() && fails < 10; ++j) { 437 for (int j = 0; j < bitmap.height() && fails < 10; ++j) {
438 if (!exclude_rect_.IsEmpty() && exclude_rect_.Contains(i, j)) 438 if (!exclude_rect_.IsEmpty() && exclude_rect_.Contains(i, j))
439 continue; 439 continue;
440 440
441 SkColor expected_color = expected_bitmap.getColor(i, j); 441 SkColor expected_color = expected_bitmap.getColor(i, j);
442 SkColor color = bitmap.getColor(i, j); 442 SkColor color = bitmap.getColor(i, j);
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 CompositingRenderWidgetHostViewBrowserTestTabCapture, 853 CompositingRenderWidgetHostViewBrowserTestTabCapture,
854 testing::ValuesIn(kAllCompositingModes)); 854 testing::ValuesIn(kAllCompositingModes));
855 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing, 855 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing,
856 CompositingRenderWidgetHostViewTabCaptureHighDPI, 856 CompositingRenderWidgetHostViewTabCaptureHighDPI,
857 testing::ValuesIn(kAllCompositingModes)); 857 testing::ValuesIn(kAllCompositingModes));
858 858
859 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) 859 #endif // !defined(OS_ANDROID) && !defined(OS_IOS)
860 860
861 } // namespace 861 } // namespace
862 } // namespace content 862 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/capture/web_contents_video_capture_device.cc ('k') | content/common/common_param_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698