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

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

Issue 88033002: Add RGB565 Texture readback support in gl_helper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Corrected indentation. Created 6 years, 11 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 (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 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 SetExcludeRect( 731 SetExcludeRect(
732 gfx::Rect(output_size.width() / 2 - 1, 0, 2, output_size.height())); 732 gfx::Rect(output_size.width() / 2 - 1, 0, 2, output_size.height()));
733 } 733 }
734 #endif 734 #endif
735 735
736 base::Callback<void(bool, const SkBitmap&)> callback = 736 base::Callback<void(bool, const SkBitmap&)> callback =
737 base::Bind(&CompositingRenderWidgetHostViewBrowserTestTabCapture:: 737 base::Bind(&CompositingRenderWidgetHostViewBrowserTestTabCapture::
738 CopyFromCompositingSurfaceCallback, 738 CopyFromCompositingSurfaceCallback,
739 base::Unretained(this), 739 base::Unretained(this),
740 run_loop.QuitClosure()); 740 run_loop.QuitClosure());
741 rwhvp->CopyFromCompositingSurface(copy_rect, output_size, callback); 741 rwhvp->CopyFromCompositingSurface(copy_rect,
742 output_size,
743 callback,
744 false);
742 } 745 }
743 run_loop.Run(); 746 run_loop.Run();
744 } 747 }
745 748
746 // Sets up |bitmap| to have size |copy_size|. It floods the left half with 749 // Sets up |bitmap| to have size |copy_size|. It floods the left half with
747 // #0ff and the right half with #ff0. 750 // #0ff and the right half with #ff0.
748 void SetupLeftRightBitmap(const gfx::Size& copy_size, SkBitmap* bitmap) { 751 void SetupLeftRightBitmap(const gfx::Size& copy_size, SkBitmap* bitmap) {
749 bitmap->setConfig( 752 bitmap->setConfig(
750 SkBitmap::kARGB_8888_Config, copy_size.width(), copy_size.height()); 753 SkBitmap::kARGB_8888_Config, copy_size.width(), copy_size.height());
751 bitmap->allocPixels(); 754 bitmap->allocPixels();
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 CompositingRenderWidgetHostViewBrowserTestTabCapture, 953 CompositingRenderWidgetHostViewBrowserTestTabCapture,
951 testing::ValuesIn(kAllCompositingModes)); 954 testing::ValuesIn(kAllCompositingModes));
952 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing, 955 INSTANTIATE_TEST_CASE_P(GLAndSoftwareCompositing,
953 CompositingRenderWidgetHostViewTabCaptureHighDPI, 956 CompositingRenderWidgetHostViewTabCaptureHighDPI,
954 testing::ValuesIn(kAllCompositingModes)); 957 testing::ValuesIn(kAllCompositingModes));
955 958
956 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) 959 #endif // !defined(OS_ANDROID) && !defined(OS_IOS)
957 960
958 } // namespace 961 } // namespace
959 } // namespace content 962 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698