| OLD | NEW |
| 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/barrier_closure.h" | 5 #include "base/barrier_closure.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/message_loop/message_loop_proxy.h" | 7 #include "base/message_loop/message_loop_proxy.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "content/browser/gpu/compositor_util.h" | 10 #include "content/browser/gpu/compositor_util.h" |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 return; | 502 return; |
| 503 } | 503 } |
| 504 | 504 |
| 505 media::SkCanvasVideoRenderer video_renderer; | 505 media::SkCanvasVideoRenderer video_renderer; |
| 506 | 506 |
| 507 SkBitmap bitmap; | 507 SkBitmap bitmap; |
| 508 bitmap.allocN32Pixels(video_frame->visible_rect().width(), | 508 bitmap.allocN32Pixels(video_frame->visible_rect().width(), |
| 509 video_frame->visible_rect().height()); | 509 video_frame->visible_rect().height()); |
| 510 // Don't clear the canvas because drawing a video frame by Src mode. | 510 // Don't clear the canvas because drawing a video frame by Src mode. |
| 511 SkCanvas canvas(bitmap); | 511 SkCanvas canvas(bitmap); |
| 512 video_renderer.Copy(video_frame, &canvas); | 512 video_renderer.Copy(video_frame, &canvas, media::Context3D()); |
| 513 | 513 |
| 514 ReadbackRequestCallbackTest(quit_callback, bitmap, READBACK_SUCCESS); | 514 ReadbackRequestCallbackTest(quit_callback, bitmap, READBACK_SUCCESS); |
| 515 } | 515 } |
| 516 | 516 |
| 517 void SetAllowableError(int amount) { allowable_error_ = amount; } | 517 void SetAllowableError(int amount) { allowable_error_ = amount; } |
| 518 void SetExcludeRect(gfx::Rect exclude) { exclude_rect_ = exclude; } | 518 void SetExcludeRect(gfx::Rect exclude) { exclude_rect_ = exclude; } |
| 519 | 519 |
| 520 GURL TestUrl() override { return GURL(test_url_); } | 520 GURL TestUrl() override { return GURL(test_url_); } |
| 521 | 521 |
| 522 void SetTestUrl(std::string url) { test_url_ = url; } | 522 void SetTestUrl(std::string url) { test_url_ = url; } |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 testing::Values(GL_COMPOSITING, SOFTWARE_COMPOSITING)); | 950 testing::Values(GL_COMPOSITING, SOFTWARE_COMPOSITING)); |
| 951 INSTANTIATE_TEST_CASE_P( | 951 INSTANTIATE_TEST_CASE_P( |
| 952 GLAndSoftwareCompositing, | 952 GLAndSoftwareCompositing, |
| 953 CompositingRenderWidgetHostViewBrowserTestTabCaptureHighDPI, | 953 CompositingRenderWidgetHostViewBrowserTestTabCaptureHighDPI, |
| 954 testing::Values(GL_COMPOSITING, SOFTWARE_COMPOSITING)); | 954 testing::Values(GL_COMPOSITING, SOFTWARE_COMPOSITING)); |
| 955 | 955 |
| 956 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) | 956 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) |
| 957 | 957 |
| 958 } // namespace | 958 } // namespace |
| 959 } // namespace content | 959 } // namespace content |
| OLD | NEW |