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

Side by Side Diff: webkit/glue/webkitplatformsupport_impl.cc

Issue 15650016: [Not for review] Discardable memory emulation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 6 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 "webkit/glue/webkitplatformsupport_impl.h" 5 #include "webkit/glue/webkitplatformsupport_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 if (device_source == WebKit::WebGestureEvent::Touchscreen) 999 if (device_source == WebKit::WebGestureEvent::Touchscreen)
1000 return fling_curve_configuration_->CreateForTouchScreen(velocity, 1000 return fling_curve_configuration_->CreateForTouchScreen(velocity,
1001 cumulative_scroll); 1001 cumulative_scroll);
1002 1002
1003 return fling_curve_configuration_->CreateForTouchPad(velocity, 1003 return fling_curve_configuration_->CreateForTouchPad(velocity,
1004 cumulative_scroll); 1004 cumulative_scroll);
1005 } 1005 }
1006 1006
1007 WebKit::WebDiscardableMemory* 1007 WebKit::WebDiscardableMemory*
1008 WebKitPlatformSupportImpl::allocateAndLockDiscardableMemory(size_t bytes) { 1008 WebKitPlatformSupportImpl::allocateAndLockDiscardableMemory(size_t bytes) {
1009 if (!base::DiscardableMemory::Supported())
1010 return NULL;
1011 scoped_ptr<WebDiscardableMemoryImpl> discardable( 1009 scoped_ptr<WebDiscardableMemoryImpl> discardable(
1012 new WebDiscardableMemoryImpl()); 1010 new WebDiscardableMemoryImpl());
1013 if (discardable->InitializeAndLock(bytes)) 1011 if (discardable->InitializeAndLock(bytes))
1014 return discardable.release(); 1012 return discardable.release();
1015 return NULL; 1013 return NULL;
1016 } 1014 }
1017 1015
1018 #if defined(OS_ANDROID) 1016 #if defined(OS_ANDROID)
1019 webkit_media::WebAudioMediaCodecRunner 1017 webkit_media::WebAudioMediaCodecRunner
1020 WebKitPlatformSupportImpl::GetWebAudioMediaCodecRunner() { 1018 WebKitPlatformSupportImpl::GetWebAudioMediaCodecRunner() {
1021 return base::Bind(&NullRunWebAudioMediaCodec); 1019 return base::Bind(&NullRunWebAudioMediaCodec);
1022 } 1020 }
1023 #endif 1021 #endif
1024 1022
1025 } // namespace webkit_glue 1023 } // namespace webkit_glue
OLDNEW
« base/memory/discardable_memory_emulated.cc ('K') | « content/renderer/render_widget.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698