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

Side by Side Diff: android_webview/common/pixel_buffer_factory_proxy.cc

Issue 13135004: android_webview: changes to support Android GraphicBuffers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate code reviews Created 7 years, 8 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
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "android_webview/common/pixel_buffer_factory_proxy.h"
6
7 #include "android_webview/common/aw_switches.h"
8 #include "base/command_line.h"
9 #include "base/logging.h"
10
11 namespace android_webview {
12
13 gfx::PixelBuffer::Create* g_pixel_buffer_factory_ = NULL;
14
15 const gfx::PixelBuffer::Create& GetPixelBufferFactoryProxy() {
16 return *g_pixel_buffer_factory_;
17 }
18
19 void SetPixelBufferFactoryProxy(const gfx::PixelBuffer::Create& factory) {
20 DCHECK(g_pixel_buffer_factory_ == NULL);
21 g_pixel_buffer_factory_ = CommandLine::ForCurrentProcess()->HasSwitch(
22 switches::kUseZeroCopyBuffers)
23 ? new gfx::PixelBuffer::Create(factory) : NULL;
24 }
25
26 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698