Commit e7d7e16b authored by Tarun Bansal's avatar Tarun Bansal Committed by Commit Bot

Move some of the memory retrieving code to third_party/Webkit/common

This is a pure refactor CL and does not introduce any functionality change.
Moving some of the code that retrieves memory information to
t_p/Webkit/common makes it possible to access
that code from chrome/browser.

In the next CL, chrome/browser/chrome_content_browser_client.cc
would call GetApproximatedDeviceMemory() to attach the required
client hints to the navigation requests.

Bug: 764513
Change-Id: I96e5d812b8f46e83601d02c6c48f1a37919f8041
Reviewed-on: https://chromium-review.googlesource.com/663768Reviewed-by: default avatarFadi Meawad <fmeawad@chromium.org>
Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501648}
parent 1e9e0fed
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "core/page/Page.h" #include "core/page/Page.h"
#include "platform/Language.h" #include "platform/Language.h"
#include "platform/MemoryCoordinator.h" #include "platform/MemoryCoordinator.h"
#include "third_party/WebKit/common/device_memory/approximated_device_memory.h"
namespace blink { namespace blink {
...@@ -52,7 +53,7 @@ String Navigator::vendor() const { ...@@ -52,7 +53,7 @@ String Navigator::vendor() const {
} }
float Navigator::deviceMemory() const { float Navigator::deviceMemory() const {
return MemoryCoordinator::GetApproximatedDeviceMemory(); return ApproximatedDeviceMemory::GetApproximatedDeviceMemory();
} }
String Navigator::vendorSub() const { String Navigator::vendorSub() const {
......
...@@ -87,6 +87,7 @@ ...@@ -87,6 +87,7 @@
#include "public/platform/WebCachePolicy.h" #include "public/platform/WebCachePolicy.h"
#include "public/platform/WebInsecureRequestPolicy.h" #include "public/platform/WebInsecureRequestPolicy.h"
#include "public/platform/modules/serviceworker/WebServiceWorkerNetworkProvider.h" #include "public/platform/modules/serviceworker/WebServiceWorkerNetworkProvider.h"
#include "third_party/WebKit/common/device_memory/approximated_device_memory.h"
namespace blink { namespace blink {
...@@ -783,8 +784,8 @@ void FrameFetchContext::AddClientHintsIfNecessary( ...@@ -783,8 +784,8 @@ void FrameFetchContext::AddClientHintsIfNecessary(
hints_preferences, enabled_hints)) { hints_preferences, enabled_hints)) {
request.AddHTTPHeaderField( request.AddHTTPHeaderField(
"Device-Memory", "Device-Memory",
AtomicString( AtomicString(String::Number(
String::Number(MemoryCoordinator::GetApproximatedDeviceMemory()))); ApproximatedDeviceMemory::GetApproximatedDeviceMemory())));
} }
float dpr = GetDevicePixelRatio(); float dpr = GetDevicePixelRatio();
......
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
#include "public/platform/WebInsecureRequestPolicy.h" #include "public/platform/WebInsecureRequestPolicy.h"
#include "testing/gmock/include/gmock/gmock.h" #include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/common/device_memory/approximated_device_memory.h"
namespace blink { namespace blink {
...@@ -521,13 +522,13 @@ TEST_F(FrameFetchContextHintsTest, MonitorDeviceMemoryHints) { ...@@ -521,13 +522,13 @@ TEST_F(FrameFetchContextHintsTest, MonitorDeviceMemoryHints) {
ClientHintsPreferences preferences; ClientHintsPreferences preferences;
preferences.SetShouldSendForTesting(mojom::WebClientHintsType::kDeviceMemory); preferences.SetShouldSendForTesting(mojom::WebClientHintsType::kDeviceMemory);
document->GetClientHintsPreferences().UpdateFrom(preferences); document->GetClientHintsPreferences().UpdateFrom(preferences);
MemoryCoordinator::SetPhysicalMemoryMBForTesting(4096); ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(4096);
ExpectHeader("http://www.example.com/1.gif", "Device-Memory", true, "4"); ExpectHeader("http://www.example.com/1.gif", "Device-Memory", true, "4");
MemoryCoordinator::SetPhysicalMemoryMBForTesting(2048); ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(2048);
ExpectHeader("http://www.example.com/1.gif", "Device-Memory", true, "2"); ExpectHeader("http://www.example.com/1.gif", "Device-Memory", true, "2");
MemoryCoordinator::SetPhysicalMemoryMBForTesting(64385); ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(64385);
ExpectHeader("http://www.example.com/1.gif", "Device-Memory", true, "64"); ExpectHeader("http://www.example.com/1.gif", "Device-Memory", true, "64");
MemoryCoordinator::SetPhysicalMemoryMBForTesting(768); ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(768);
ExpectHeader("http://www.example.com/1.gif", "Device-Memory", true, "0.75"); ExpectHeader("http://www.example.com/1.gif", "Device-Memory", true, "0.75");
ExpectHeader("http://www.example.com/1.gif", "DPR", false, ""); ExpectHeader("http://www.example.com/1.gif", "DPR", false, "");
ExpectHeader("http://www.example.com/1.gif", "Width", false, ""); ExpectHeader("http://www.example.com/1.gif", "Width", false, "");
...@@ -588,7 +589,7 @@ TEST_F(FrameFetchContextHintsTest, MonitorAllHints) { ...@@ -588,7 +589,7 @@ TEST_F(FrameFetchContextHintsTest, MonitorAllHints) {
mojom::WebClientHintsType::kResourceWidth); mojom::WebClientHintsType::kResourceWidth);
preferences.SetShouldSendForTesting( preferences.SetShouldSendForTesting(
mojom::WebClientHintsType::kViewportWidth); mojom::WebClientHintsType::kViewportWidth);
MemoryCoordinator::SetPhysicalMemoryMBForTesting(4096); ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(4096);
document->GetClientHintsPreferences().UpdateFrom(preferences); document->GetClientHintsPreferences().UpdateFrom(preferences);
ExpectHeader("http://www.example.com/1.gif", "Device-Memory", true, "4"); ExpectHeader("http://www.example.com/1.gif", "Device-Memory", true, "4");
ExpectHeader("http://www.example.com/1.gif", "DPR", true, "1"); ExpectHeader("http://www.example.com/1.gif", "DPR", true, "1");
......
...@@ -1738,7 +1738,6 @@ test("blink_platform_unittests") { ...@@ -1738,7 +1738,6 @@ test("blink_platform_unittests") {
"LayoutUnitTest.cpp", "LayoutUnitTest.cpp",
"LifecycleContextTest.cpp", "LifecycleContextTest.cpp",
"LongTaskDetectorTest.cpp", "LongTaskDetectorTest.cpp",
"MemoryCoordinatorTest.cpp",
"PODArenaTest.cpp", "PODArenaTest.cpp",
"PODFreeListArenaTest.cpp", "PODFreeListArenaTest.cpp",
"PODIntervalTreeTest.cpp", "PODIntervalTreeTest.cpp",
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "platform/wtf/allocator/Partitions.h" #include "platform/wtf/allocator/Partitions.h"
#include "public/platform/WebThread.h" #include "public/platform/WebThread.h"
#include "public/web/WebKit.h" #include "public/web/WebKit.h"
#include "third_party/WebKit/common/device_memory/approximated_device_memory.h"
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
#include "base/android/sys_utils.h" #include "base/android/sys_utils.h"
...@@ -26,59 +27,13 @@ void DecommitFreeableMemory() { ...@@ -26,59 +27,13 @@ void DecommitFreeableMemory() {
} }
// static // static
float MemoryCoordinator::approximated_device_memory_gb_ = 0.0;
bool MemoryCoordinator::is_low_end_device_ = false; bool MemoryCoordinator::is_low_end_device_ = false;
int64_t MemoryCoordinator::physical_memory_mb_ = 0;
// static // static
bool MemoryCoordinator::IsLowEndDevice() { bool MemoryCoordinator::IsLowEndDevice() {
return is_low_end_device_; return is_low_end_device_;
} }
// static
int64_t MemoryCoordinator::GetPhysicalMemoryMB() {
return physical_memory_mb_;
}
// static
void MemoryCoordinator::SetPhysicalMemoryMBForTesting(
int64_t physical_memory_mb) {
physical_memory_mb_ = physical_memory_mb;
CalculateAndSetApproximatedDeviceMemory();
}
// static
float MemoryCoordinator::GetApproximatedDeviceMemory() {
return approximated_device_memory_gb_;
}
// static
void MemoryCoordinator::CalculateAndSetApproximatedDeviceMemory() {
// The calculations in this method are described in the specifcations:
// https://github.com/WICG/device-memory.
DCHECK_GT(physical_memory_mb_, 0);
int lower_bound = physical_memory_mb_;
int power = 0;
// Extract the most significant 2-bits and their location.
while (lower_bound >= 4) {
lower_bound >>= 1;
power++;
}
// The lower_bound value is either 0b10 or 0b11.
DCHECK(lower_bound & 2);
int64_t upper_bound = lower_bound + 1;
lower_bound = lower_bound << power;
upper_bound = upper_bound << power;
// Find the closest bound, and convert it to GB.
if (physical_memory_mb_ - lower_bound <= upper_bound - physical_memory_mb_)
approximated_device_memory_gb_ = static_cast<float>(lower_bound) / 1024.0;
else
approximated_device_memory_gb_ = static_cast<float>(upper_bound) / 1024.0;
}
// static // static
bool MemoryCoordinator::IsCurrentlyLowMemory() { bool MemoryCoordinator::IsCurrentlyLowMemory() {
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
...@@ -91,8 +46,7 @@ bool MemoryCoordinator::IsCurrentlyLowMemory() { ...@@ -91,8 +46,7 @@ bool MemoryCoordinator::IsCurrentlyLowMemory() {
// static // static
void MemoryCoordinator::Initialize() { void MemoryCoordinator::Initialize() {
is_low_end_device_ = ::base::SysInfo::IsLowEndDevice(); is_low_end_device_ = ::base::SysInfo::IsLowEndDevice();
physical_memory_mb_ = ::base::SysInfo::AmountOfPhysicalMemoryMB(); ApproximatedDeviceMemory::Initialize();
CalculateAndSetApproximatedDeviceMemory();
} }
// static // static
......
...@@ -40,18 +40,6 @@ class PLATFORM_EXPORT MemoryCoordinator final ...@@ -40,18 +40,6 @@ class PLATFORM_EXPORT MemoryCoordinator final
// Can be overridden in layout tests via internals. // Can be overridden in layout tests via internals.
static bool IsLowEndDevice(); static bool IsLowEndDevice();
// Returns the amount of physical memory in megabytes on the device.
static int64_t GetPhysicalMemoryMB();
// Returns an approximation of the physical memory rounded to to the most
// significant 2-bits. This information is provided to web-developers to allow
// them to customize the experience of their page to the possible available
// device memory.
static float GetApproximatedDeviceMemory();
// Override the value of the physical memory for testing.
static void SetPhysicalMemoryMBForTesting(int64_t);
// Returns true when available memory is low. // Returns true when available memory is low.
// This is not cheap and should not be called repeatedly. // This is not cheap and should not be called repeatedly.
// TODO(keishi): Remove when MemoryState is ready. // TODO(keishi): Remove when MemoryState is ready.
...@@ -89,11 +77,7 @@ class PLATFORM_EXPORT MemoryCoordinator final ...@@ -89,11 +77,7 @@ class PLATFORM_EXPORT MemoryCoordinator final
void ClearMemory(); void ClearMemory();
static void ClearThreadSpecificMemory(); static void ClearThreadSpecificMemory();
static void CalculateAndSetApproximatedDeviceMemory();
static float approximated_device_memory_gb_;
static bool is_low_end_device_; static bool is_low_end_device_;
static int64_t physical_memory_mb_;
HeapHashSet<WeakMember<MemoryCoordinatorClient>> clients_; HeapHashSet<WeakMember<MemoryCoordinatorClient>> clients_;
HashSet<WebThread*> web_threads_; HashSet<WebThread*> web_threads_;
......
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "platform/MemoryCoordinator.h"
#include "platform/testing/TestingPlatformSupport.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace blink {
class MemoryCoordinatorTest : public ::testing::Test {};
TEST_F(MemoryCoordinatorTest, GetApproximatedDeviceMemory) {
MemoryCoordinator::SetPhysicalMemoryMBForTesting(128); // 128MB
EXPECT_EQ(0.125, MemoryCoordinator::GetApproximatedDeviceMemory());
MemoryCoordinator::SetPhysicalMemoryMBForTesting(256); // 256MB
EXPECT_EQ(0.25, MemoryCoordinator::GetApproximatedDeviceMemory());
MemoryCoordinator::SetPhysicalMemoryMBForTesting(510); // <512MB
EXPECT_EQ(0.5, MemoryCoordinator::GetApproximatedDeviceMemory());
MemoryCoordinator::SetPhysicalMemoryMBForTesting(512); // 512MB
EXPECT_EQ(0.5, MemoryCoordinator::GetApproximatedDeviceMemory());
MemoryCoordinator::SetPhysicalMemoryMBForTesting(640); // 512+128MB
EXPECT_EQ(0.5, MemoryCoordinator::GetApproximatedDeviceMemory());
MemoryCoordinator::SetPhysicalMemoryMBForTesting(768); // 512+256MB
EXPECT_EQ(0.75, MemoryCoordinator::GetApproximatedDeviceMemory());
MemoryCoordinator::SetPhysicalMemoryMBForTesting(1000); // <1GB
EXPECT_EQ(1, MemoryCoordinator::GetApproximatedDeviceMemory());
MemoryCoordinator::SetPhysicalMemoryMBForTesting(1024); // 1GB
EXPECT_EQ(1, MemoryCoordinator::GetApproximatedDeviceMemory());
MemoryCoordinator::SetPhysicalMemoryMBForTesting(1536); // 1.5GB
EXPECT_EQ(1.5, MemoryCoordinator::GetApproximatedDeviceMemory());
MemoryCoordinator::SetPhysicalMemoryMBForTesting(2000); // <2GB
EXPECT_EQ(2, MemoryCoordinator::GetApproximatedDeviceMemory());
MemoryCoordinator::SetPhysicalMemoryMBForTesting(2048); // 2GB
EXPECT_EQ(2, MemoryCoordinator::GetApproximatedDeviceMemory());
MemoryCoordinator::SetPhysicalMemoryMBForTesting(3000); // <3GB
EXPECT_EQ(3, MemoryCoordinator::GetApproximatedDeviceMemory());
MemoryCoordinator::SetPhysicalMemoryMBForTesting(5120); // 5GB
EXPECT_EQ(4, MemoryCoordinator::GetApproximatedDeviceMemory());
MemoryCoordinator::SetPhysicalMemoryMBForTesting(8192); // 8GB
EXPECT_EQ(8, MemoryCoordinator::GetApproximatedDeviceMemory());
MemoryCoordinator::SetPhysicalMemoryMBForTesting(16384); // 16GB
EXPECT_EQ(16, MemoryCoordinator::GetApproximatedDeviceMemory());
MemoryCoordinator::SetPhysicalMemoryMBForTesting(32768); // 32GB
EXPECT_EQ(32, MemoryCoordinator::GetApproximatedDeviceMemory());
MemoryCoordinator::SetPhysicalMemoryMBForTesting(64385); // <64GB
EXPECT_EQ(64, MemoryCoordinator::GetApproximatedDeviceMemory());
}
} // namespace blink
...@@ -21,6 +21,8 @@ component("blink_common") { ...@@ -21,6 +21,8 @@ component("blink_common") {
sources = [ sources = [
"common_export.h", "common_export.h",
"device_memory/approximated_device_memory.cc",
"device_memory/approximated_device_memory.h",
"mime_util/mime_util.cc", "mime_util/mime_util.cc",
"mime_util/mime_util.h", "mime_util/mime_util.h",
] ]
...@@ -40,6 +42,7 @@ test("blink_common_unittests") { ...@@ -40,6 +42,7 @@ test("blink_common_unittests") {
visibility = [ "*" ] visibility = [ "*" ]
sources = [ sources = [
"device_memory/approximated_device_memory_unittest.cc",
"mime_util/mime_util_unittest.cc", "mime_util/mime_util_unittest.cc",
"test/run_all_unittests.cc", "test/run_all_unittests.cc",
] ]
......
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/WebKit/common/device_memory/approximated_device_memory.h"
#include "base/logging.h"
#include "base/sys_info.h"
namespace blink {
// static
float ApproximatedDeviceMemory::approximated_device_memory_gb_ = 0.0;
int64_t ApproximatedDeviceMemory::physical_memory_mb_ = 0;
// static
void ApproximatedDeviceMemory::Initialize() {
DCHECK_EQ(0.0, approximated_device_memory_gb_);
DCHECK_EQ(0, physical_memory_mb_);
physical_memory_mb_ = ::base::SysInfo::AmountOfPhysicalMemoryMB();
CalculateAndSetApproximatedDeviceMemory();
}
// static
float ApproximatedDeviceMemory::GetApproximatedDeviceMemory() {
return approximated_device_memory_gb_;
}
// static
void ApproximatedDeviceMemory::CalculateAndSetApproximatedDeviceMemory() {
// The calculations in this method are described in the specifcations:
// https://github.com/WICG/device-memory.
DCHECK_GT(physical_memory_mb_, 0);
int lower_bound = physical_memory_mb_;
int power = 0;
// Extract the most significant 2-bits and their location.
while (lower_bound >= 4) {
lower_bound >>= 1;
power++;
}
// The lower_bound value is either 0b10 or 0b11.
DCHECK(lower_bound & 2);
int64_t upper_bound = lower_bound + 1;
lower_bound = lower_bound << power;
upper_bound = upper_bound << power;
// Find the closest bound, and convert it to GB.
if (physical_memory_mb_ - lower_bound <= upper_bound - physical_memory_mb_)
approximated_device_memory_gb_ = static_cast<float>(lower_bound) / 1024.0;
else
approximated_device_memory_gb_ = static_cast<float>(upper_bound) / 1024.0;
}
// static
void ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(
int64_t physical_memory_mb) {
physical_memory_mb_ = physical_memory_mb;
CalculateAndSetApproximatedDeviceMemory();
}
} // namespace blink
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef THIRD_PARTY_WEBKIT_COMMON_DEVICE_MEMORY_APPROXIMATED_DEVICE_MEMORY_H_
#define THIRD_PARTY_WEBKIT_COMMON_DEVICE_MEMORY_APPROXIMATED_DEVICE_MEMORY_H_
#include <stdint.h>
#include "third_party/WebKit/common/common_export.h"
namespace blink {
class ApproximatedDeviceMemory {
public:
// Caches the device's physical memory in static members.
static void BLINK_COMMON_EXPORT Initialize();
// Returns an approximation of the physical memory rounded to to the most
// significant 2-bits. This information is provided to web-developers to allow
// them to customize the experience of their page to the possible available
// device memory.
static float BLINK_COMMON_EXPORT GetApproximatedDeviceMemory();
// Override the value of the physical memory for testing.
static void BLINK_COMMON_EXPORT SetPhysicalMemoryMBForTesting(int64_t);
private:
static void CalculateAndSetApproximatedDeviceMemory();
static float approximated_device_memory_gb_;
static int64_t physical_memory_mb_;
};
} // namespace blink
#endif // THIRD_PARTY_WEBKIT_COMMON_DEVICE_MEMORY_APPROXIMATED_DEVICE_MEMORY_H_
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/WebKit/common/device_memory/approximated_device_memory.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace blink {
namespace {
class ApproximatedDeviceMemoryTest : public ::testing::Test {};
TEST_F(ApproximatedDeviceMemoryTest, GetApproximatedDeviceMemory) {
ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(128); // 128MB
EXPECT_EQ(0.125, ApproximatedDeviceMemory::GetApproximatedDeviceMemory());
ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(256); // 256MB
EXPECT_EQ(0.25, ApproximatedDeviceMemory::GetApproximatedDeviceMemory());
ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(510); // <512MB
EXPECT_EQ(0.5, ApproximatedDeviceMemory::GetApproximatedDeviceMemory());
ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(512); // 512MB
EXPECT_EQ(0.5, ApproximatedDeviceMemory::GetApproximatedDeviceMemory());
ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(640); // 512+128MB
EXPECT_EQ(0.5, ApproximatedDeviceMemory::GetApproximatedDeviceMemory());
ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(768); // 512+256MB
EXPECT_EQ(0.75, ApproximatedDeviceMemory::GetApproximatedDeviceMemory());
ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(1000); // <1GB
EXPECT_EQ(1, ApproximatedDeviceMemory::GetApproximatedDeviceMemory());
ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(1024); // 1GB
EXPECT_EQ(1, ApproximatedDeviceMemory::GetApproximatedDeviceMemory());
ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(1536); // 1.5GB
EXPECT_EQ(1.5, ApproximatedDeviceMemory::GetApproximatedDeviceMemory());
ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(2000); // <2GB
EXPECT_EQ(2, ApproximatedDeviceMemory::GetApproximatedDeviceMemory());
ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(2048); // 2GB
EXPECT_EQ(2, ApproximatedDeviceMemory::GetApproximatedDeviceMemory());
ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(3000); // <3GB
EXPECT_EQ(3, ApproximatedDeviceMemory::GetApproximatedDeviceMemory());
ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(5120); // 5GB
EXPECT_EQ(4, ApproximatedDeviceMemory::GetApproximatedDeviceMemory());
ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(8192); // 8GB
EXPECT_EQ(8, ApproximatedDeviceMemory::GetApproximatedDeviceMemory());
ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(16384); // 16GB
EXPECT_EQ(16, ApproximatedDeviceMemory::GetApproximatedDeviceMemory());
ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(32768); // 32GB
EXPECT_EQ(32, ApproximatedDeviceMemory::GetApproximatedDeviceMemory());
ApproximatedDeviceMemory::SetPhysicalMemoryMBForTesting(64385); // <64GB
EXPECT_EQ(64, ApproximatedDeviceMemory::GetApproximatedDeviceMemory());
}
} // namespace
} // namespace blink
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment