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

Side by Side Diff: content/renderer/pepper/ppb_graphics_3d_impl.cc

Issue 2102273002: mac: Enable Pepper3D Image Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp77_pepper
Patch Set: Created 4 years, 5 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 | « no previous file | 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 (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/renderer/pepper/ppb_graphics_3d_impl.h" 5 #include "content/renderer/pepper/ppb_graphics_3d_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 bound_to_instance_(false), 45 bound_to_instance_(false),
46 commit_pending_(false), 46 commit_pending_(false),
47 has_alpha_(false), 47 has_alpha_(false),
48 use_image_chromium_(false), 48 use_image_chromium_(false),
49 weak_ptr_factory_(this) { 49 weak_ptr_factory_(this) {
50 #if defined(OS_MACOSX) 50 #if defined(OS_MACOSX)
51 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 51 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
52 bool use_image_chromium = 52 bool use_image_chromium =
53 !command_line->HasSwitch(switches::kDisablePepper3DImageChromium); 53 !command_line->HasSwitch(switches::kDisablePepper3DImageChromium);
54 use_image_chromium_ = use_image_chromium; 54 use_image_chromium_ = use_image_chromium;
55
56 // TODO(erikchen): Remove this line to enable the feature.
57 use_image_chromium_ = false;
58 #endif 55 #endif
59 } 56 }
60 57
61 PPB_Graphics3D_Impl::~PPB_Graphics3D_Impl() { 58 PPB_Graphics3D_Impl::~PPB_Graphics3D_Impl() {
62 // Unset the client before the command_buffer_ is destroyed, similar to how 59 // Unset the client before the command_buffer_ is destroyed, similar to how
63 // WeakPtrFactory invalidates before it. 60 // WeakPtrFactory invalidates before it.
64 if (command_buffer_) 61 if (command_buffer_)
65 command_buffer_->SetGpuControlClient(nullptr); 62 command_buffer_->SetGpuControlClient(nullptr);
66 } 63 }
67 64
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 if (!mailboxes_to_reuse_.empty()) { 382 if (!mailboxes_to_reuse_.empty()) {
386 gpu::Mailbox mailbox = mailboxes_to_reuse_.back(); 383 gpu::Mailbox mailbox = mailboxes_to_reuse_.back();
387 mailboxes_to_reuse_.pop_back(); 384 mailboxes_to_reuse_.pop_back();
388 return mailbox; 385 return mailbox;
389 } 386 }
390 387
391 return gpu::Mailbox::Generate(); 388 return gpu::Mailbox::Generate();
392 } 389 }
393 390
394 } // namespace content 391 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698