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 #include "media/gpu/ipc/service/gpu_video_decode_accelerator.h" | 5 #include "media/gpu/ipc/service/gpu_video_decode_accelerator.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "media/gpu/gpu_video_accelerator_util.h" | 26 #include "media/gpu/gpu_video_accelerator_util.h" |
27 #include "media/gpu/gpu_video_decode_accelerator_factory_impl.h" | 27 #include "media/gpu/gpu_video_decode_accelerator_factory_impl.h" |
28 #include "media/gpu/ipc/common/media_messages.h" | 28 #include "media/gpu/ipc/common/media_messages.h" |
29 #include "ui/gfx/geometry/size.h" | 29 #include "ui/gfx/geometry/size.h" |
30 #include "ui/gl/gl_context.h" | 30 #include "ui/gl/gl_context.h" |
31 #include "ui/gl/gl_image.h" | 31 #include "ui/gl/gl_image.h" |
32 | 32 |
33 namespace media { | 33 namespace media { |
34 | 34 |
35 namespace { | 35 namespace { |
36 static gfx::GLContext* GetGLContext( | 36 static gl::GLContext* GetGLContext( |
37 const base::WeakPtr<gpu::GpuCommandBufferStub>& stub) { | 37 const base::WeakPtr<gpu::GpuCommandBufferStub>& stub) { |
38 if (!stub) { | 38 if (!stub) { |
39 DLOG(ERROR) << "Stub is gone; no GLContext."; | 39 DLOG(ERROR) << "Stub is gone; no GLContext."; |
40 return nullptr; | 40 return nullptr; |
41 } | 41 } |
42 | 42 |
43 return stub->decoder()->GetGLContext(); | 43 return stub->decoder()->GetGLContext(); |
44 } | 44 } |
45 | 45 |
46 static bool MakeDecoderContextCurrent( | 46 static bool MakeDecoderContextCurrent( |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 GLenum target = texture_ref->texture()->target(); | 511 GLenum target = texture_ref->texture()->target(); |
512 gpu::gles2::TextureManager* texture_manager = | 512 gpu::gles2::TextureManager* texture_manager = |
513 stub_->decoder()->GetContextGroup()->texture_manager(); | 513 stub_->decoder()->GetContextGroup()->texture_manager(); |
514 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); | 514 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); |
515 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); | 515 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); |
516 } | 516 } |
517 uncleared_textures_.erase(it); | 517 uncleared_textures_.erase(it); |
518 } | 518 } |
519 | 519 |
520 } // namespace media | 520 } // namespace media |
OLD | NEW |