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