OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // The bulk of this file is support code; sorry about that. Here's an overview | 5 // The bulk of this file is support code; sorry about that. Here's an overview |
6 // to hopefully help readers of this code: | 6 // to hopefully help readers of this code: |
7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or | 7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or |
8 // Win/EGL. | 8 // Win/EGL. |
9 // - ClientState is an enum for the state of the decode client used by the test. | 9 // - ClientState is an enum for the state of the decode client used by the test. |
10 // - ClientStateNotification is a barrier abstraction that allows the test code | 10 // - ClientStateNotification is a barrier abstraction that allows the test code |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
52 #include "ui/gfx/codec/png_codec.h" | 52 #include "ui/gfx/codec/png_codec.h" |
53 | 53 |
54 #if defined(OS_WIN) | 54 #if defined(OS_WIN) |
55 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" | 55 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" |
56 #elif defined(OS_CHROMEOS) | 56 #elif defined(OS_CHROMEOS) |
57 #if defined(ARCH_CPU_ARMEL) | 57 #if defined(ARCH_CPU_ARMEL) |
58 #include "content/common/gpu/media/exynos_video_decode_accelerator.h" | 58 #include "content/common/gpu/media/exynos_video_decode_accelerator.h" |
59 #elif defined(ARCH_CPU_X86_FAMILY) | 59 #elif defined(ARCH_CPU_X86_FAMILY) |
60 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h" | 60 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h" |
61 #include "content/common/gpu/media/vaapi_wrapper.h" | 61 #include "content/common/gpu/media/vaapi_wrapper.h" |
62 #if defined(USE_X11) | |
63 #include "ui/gl/gl_implementation.h" | |
64 #endif // USE_X11 | |
62 #endif // ARCH_CPU_ARMEL | 65 #endif // ARCH_CPU_ARMEL |
63 #else | 66 #else |
64 #error The VideoAccelerator tests are not supported on this platform. | 67 #error The VideoAccelerator tests are not supported on this platform. |
65 #endif // OS_WIN | 68 #endif // OS_WIN |
66 | 69 |
67 using media::VideoDecodeAccelerator; | 70 using media::VideoDecodeAccelerator; |
68 | 71 |
69 namespace content { | 72 namespace content { |
70 namespace { | 73 namespace { |
71 | 74 |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
525 GLRenderingVDAClient::~GLRenderingVDAClient() { | 528 GLRenderingVDAClient::~GLRenderingVDAClient() { |
526 DeleteDecoder(); // Clean up in case of expected error. | 529 DeleteDecoder(); // Clean up in case of expected error. |
527 CHECK(decoder_deleted()); | 530 CHECK(decoder_deleted()); |
528 STLDeleteValues(&picture_buffers_by_id_); | 531 STLDeleteValues(&picture_buffers_by_id_); |
529 SetState(CS_DESTROYED); | 532 SetState(CS_DESTROYED); |
530 } | 533 } |
531 | 534 |
532 static bool DoNothingReturnTrue() { return true; } | 535 static bool DoNothingReturnTrue() { return true; } |
533 | 536 |
534 void GLRenderingVDAClient::CreateAndStartDecoder() { | 537 void GLRenderingVDAClient::CreateAndStartDecoder() { |
538 CHECK_EQ(gfx::kGLImplementationDesktopGL, gfx::GetGLImplementation()); | |
Ami GONE FROM CHROMIUM
2014/01/10 01:15:10
I expected you to put this inside the cros&&x86 #i
danakj
2014/01/10 01:18:14
Right, I just had changed it to check != OSMesa in
| |
535 CHECK(decoder_deleted()); | 539 CHECK(decoder_deleted()); |
536 CHECK(!decoder_.get()); | 540 CHECK(!decoder_.get()); |
537 | 541 |
538 VideoDecodeAccelerator::Client* client = this; | 542 VideoDecodeAccelerator::Client* client = this; |
539 base::WeakPtr<VideoDecodeAccelerator::Client> weak_client = AsWeakPtr(); | 543 base::WeakPtr<VideoDecodeAccelerator::Client> weak_client = AsWeakPtr(); |
540 if (throttling_client_) { | 544 if (throttling_client_) { |
541 client = throttling_client_.get(); | 545 client = throttling_client_.get(); |
542 weak_client = throttling_client_->AsWeakPtr(); | 546 weak_client = throttling_client_->AsWeakPtr(); |
543 } | 547 } |
544 #if defined(OS_WIN) | 548 #if defined(OS_WIN) |
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1514 } | 1518 } |
1515 if (it->first == "v" || it->first == "vmodule") | 1519 if (it->first == "v" || it->first == "vmodule") |
1516 continue; | 1520 continue; |
1517 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; | 1521 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
1518 } | 1522 } |
1519 | 1523 |
1520 base::ShadowingAtExitManager at_exit_manager; | 1524 base::ShadowingAtExitManager at_exit_manager; |
1521 | 1525 |
1522 return RUN_ALL_TESTS(); | 1526 return RUN_ALL_TESTS(); |
1523 } | 1527 } |
OLD | NEW |