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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc

Issue 1256613002: Add tracing for GL texture objects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@browser_process_id
Patch Set: Created 5 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
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 "gpu/command_buffer/service/gles2_cmd_decoder_unittest.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "gpu/command_buffer/common/gles2_cmd_format.h" 9 #include "gpu/command_buffer/common/gles2_cmd_format.h"
10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 10 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 Pool pool) { 1172 Pool pool) {
1173 PoolInfo& info = pool_infos_[pool]; 1173 PoolInfo& info = pool_infos_[pool];
1174 info.size += new_size - old_size; 1174 info.size += new_size - old_size;
1175 } 1175 }
1176 1176
1177 size_t GetPoolSize(Pool pool) { 1177 size_t GetPoolSize(Pool pool) {
1178 const PoolInfo& info = pool_infos_[pool]; 1178 const PoolInfo& info = pool_infos_[pool];
1179 return info.size - info.initial_size; 1179 return info.size - info.initial_size;
1180 } 1180 }
1181 1181
1182 uint64_t ClientTracingId() override { return 0; }
1183
1182 private: 1184 private:
1183 virtual ~SizeOnlyMemoryTracker() {} 1185 virtual ~SizeOnlyMemoryTracker() {}
1184 struct PoolInfo { 1186 struct PoolInfo {
1185 PoolInfo() : initial_size(0), size(0) {} 1187 PoolInfo() : initial_size(0), size(0) {}
1186 size_t initial_size; 1188 size_t initial_size;
1187 size_t size; 1189 size_t size;
1188 }; 1190 };
1189 std::map<Pool, PoolInfo> pool_infos_; 1191 std::map<Pool, PoolInfo> pool_infos_;
1190 }; 1192 };
1191 1193
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
1582 INSTANTIATE_TEST_CASE_P(Service, 1584 INSTANTIATE_TEST_CASE_P(Service,
1583 GLES2DecoderRGBBackbufferTest, 1585 GLES2DecoderRGBBackbufferTest,
1584 ::testing::Bool()); 1586 ::testing::Bool());
1585 1587
1586 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderDoCommandsTest, ::testing::Bool()); 1588 INSTANTIATE_TEST_CASE_P(Service, GLES2DecoderDoCommandsTest, ::testing::Bool());
1587 1589
1588 INSTANTIATE_TEST_CASE_P(Service, GLES3DecoderTest, ::testing::Bool()); 1590 INSTANTIATE_TEST_CASE_P(Service, GLES3DecoderTest, ::testing::Bool());
1589 1591
1590 } // namespace gles2 1592 } // namespace gles2
1591 } // namespace gpu 1593 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698