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

Side by Side Diff: content/common/gpu/media/mac_video_decode_accelerator.mm

Issue 10827074: Replace the explicit *VDA::Set{CGL,Egl,Glx}Context() methods with ctor params. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
OLDNEW
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 "content/common/gpu/media/mac_video_decode_accelerator.h" 5 #include "content/common/gpu/media/mac_video_decode_accelerator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #import "base/mac/foundation_util.h" 9 #import "base/mac/foundation_util.h"
10 #import "base/memory/ref_counted_memory.h" 10 #import "base/memory/ref_counted_memory.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 GL_UNSIGNED_SHORT_8_8_APPLE, 86 GL_UNSIGNED_SHORT_8_8_APPLE,
87 io_surface, 87 io_surface,
88 0) != kCGLNoError) { 88 0) != kCGLNoError) {
89 DVLOG(1) << "Failed to bind image to texture."; 89 DVLOG(1) << "Failed to bind image to texture.";
90 return false; 90 return false;
91 } 91 }
92 return glGetError() == GL_NO_ERROR; 92 return glGetError() == GL_NO_ERROR;
93 } 93 }
94 94
95 MacVideoDecodeAccelerator::MacVideoDecodeAccelerator( 95 MacVideoDecodeAccelerator::MacVideoDecodeAccelerator(
96 media::VideoDecodeAccelerator::Client* client) 96 CGLContextObj cgl_context, media::VideoDecodeAccelerator::Client* client)
97 : client_(client), 97 : client_(client),
98 cgl_context_(NULL), 98 cgl_context_(cgl_context),
99 did_build_config_record_(false) { 99 did_build_config_record_(false) {
100 } 100 }
101 101
102 void MacVideoDecodeAccelerator::SetCGLContext(CGLContextObj cgl_context) { 102 void MacVideoDecodeAccelerator::SetCGLContext() {
Pawel Osciak 2012/07/27 20:08:15 Not needed anymore...
Ami GONE FROM CHROMIUM 2012/07/27 20:22:39 Done. (the joys of editing code without the benefi
103 DCHECK(CalledOnValidThread()); 103 DCHECK(CalledOnValidThread());
104 cgl_context_ = cgl_context; 104 cgl_context_ = cgl_context;
105 } 105 }
106 106
107 bool MacVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile) { 107 bool MacVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile) {
108 DCHECK(CalledOnValidThread()); 108 DCHECK(CalledOnValidThread());
109 109
110 IOSurfaceSupport* io_surface_support = IOSurfaceSupport::Initialize(); 110 IOSurfaceSupport* io_surface_support = IOSurfaceSupport::Initialize();
111 if (!io_surface_support) 111 if (!io_surface_support)
112 return false; 112 return false;
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 } 373 }
374 374
375 MacVideoDecodeAccelerator::UsedPictureInfo::~UsedPictureInfo() { 375 MacVideoDecodeAccelerator::UsedPictureInfo::~UsedPictureInfo() {
376 } 376 }
377 377
378 MacVideoDecodeAccelerator::DecodedImageInfo::DecodedImageInfo() { 378 MacVideoDecodeAccelerator::DecodedImageInfo::DecodedImageInfo() {
379 } 379 }
380 380
381 MacVideoDecodeAccelerator::DecodedImageInfo::~DecodedImageInfo() { 381 MacVideoDecodeAccelerator::DecodedImageInfo::~DecodedImageInfo() {
382 } 382 }
OLDNEW
« no previous file with comments | « content/common/gpu/media/mac_video_decode_accelerator.h ('k') | content/common/gpu/media/omx_video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698