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

Side by Side Diff: media/gpu/content_video_view_overlay.cc

Issue 2889603005: Position overlays in AVDACodecImage (Closed)
Patch Set: rebased Created 3 years, 7 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
« no previous file with comments | « media/gpu/avda_surface_bundle.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/content_video_view_overlay.h" 5 #include "media/gpu/content_video_view_overlay.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "gpu/ipc/common/gpu_surface_lookup.h" 10 #include "gpu/ipc/common/gpu_surface_lookup.h"
(...skipping 10 matching lines...) Expand all
21 weak_factory_.GetWeakPtr(), true)); 21 weak_factory_.GetWeakPtr(), true));
22 } 22 }
23 } 23 }
24 24
25 ContentVideoViewOverlay::~ContentVideoViewOverlay() { 25 ContentVideoViewOverlay::~ContentVideoViewOverlay() {
26 // Deallocate the surface. It's okay if we don't own it. 26 // Deallocate the surface. It's okay if we don't own it.
27 // Note that this only happens once any codec is done with us. 27 // Note that this only happens once any codec is done with us.
28 ContentVideoViewOverlayAllocator::GetInstance()->DeallocateSurface(this); 28 ContentVideoViewOverlayAllocator::GetInstance()->DeallocateSurface(this);
29 } 29 }
30 30
31 void ContentVideoViewOverlay::ScheduleLayout(const gfx::Rect& rect) { 31 void ContentVideoViewOverlay::ScheduleLayout(const gfx::Rect& rect) {}
32 NOTIMPLEMENTED();
33 }
34 32
35 const base::android::JavaRef<jobject>& ContentVideoViewOverlay::GetJavaSurface() 33 const base::android::JavaRef<jobject>& ContentVideoViewOverlay::GetJavaSurface()
36 const { 34 const {
37 return surface_.j_surface(); 35 return surface_.j_surface();
38 } 36 }
39 37
40 void ContentVideoViewOverlay::OnSurfaceAvailable(bool success) { 38 void ContentVideoViewOverlay::OnSurfaceAvailable(bool success) {
41 if (!success) { 39 if (!success) {
42 // Notify that the surface won't be available. 40 // Notify that the surface won't be available.
43 config_.is_failed(this); 41 config_.is_failed(this);
(...skipping 18 matching lines...) Expand all
62 void ContentVideoViewOverlay::OnSurfaceDestroyed() { 60 void ContentVideoViewOverlay::OnSurfaceDestroyed() {
63 RunSurfaceDestroyedCallbacks(); 61 RunSurfaceDestroyedCallbacks();
64 // |this| may be deleted, or deletion might be posted elsewhere. 62 // |this| may be deleted, or deletion might be posted elsewhere.
65 } 63 }
66 64
67 int32_t ContentVideoViewOverlay::GetSurfaceId() { 65 int32_t ContentVideoViewOverlay::GetSurfaceId() {
68 return surface_id_; 66 return surface_id_;
69 } 67 }
70 68
71 } // namespace media 69 } // namespace media
OLDNEW
« no previous file with comments | « media/gpu/avda_surface_bundle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698