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

Unified Diff: cc/test/test_web_graphics_context_3d.cc

Issue 1900993002: Move SharedMemoryLimits out of WebGraphicsContext3DCommandBufferImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@limits
Patch Set: move-limits: types Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/test_web_graphics_context_3d.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/test_web_graphics_context_3d.cc
diff --git a/cc/test/test_web_graphics_context_3d.cc b/cc/test/test_web_graphics_context_3d.cc
index 0e1ea25c95c2f7b06da0a61c50953d88cb19fad5..2641c9011d75132b7298529a8d2be44f39350a22 100644
--- a/cc/test/test_web_graphics_context_3d.cc
+++ b/cc/test/test_web_graphics_context_3d.cc
@@ -57,8 +57,6 @@ TestWebGraphicsContext3D::TestWebGraphicsContext3D()
times_end_query_succeeds_(-1),
context_lost_(false),
times_map_buffer_chromium_succeeds_(-1),
- current_used_transfer_buffer_usage_bytes_(0),
- max_used_transfer_buffer_usage_bytes_(0),
next_program_id_(1000),
next_shader_id_(2000),
next_framebuffer_id_(1),
@@ -550,19 +548,10 @@ void TestWebGraphicsContext3D::bufferData(GLenum target,
return;
}
- size_t old_size = buffer->size;
-
buffer->pixels.reset(new uint8_t[size]);
buffer->size = size;
- if (data != NULL)
+ if (data != nullptr)
memcpy(buffer->pixels.get(), data, size);
- if (buffer->target == GL_PIXEL_UNPACK_TRANSFER_BUFFER_CHROMIUM)
- current_used_transfer_buffer_usage_bytes_ +=
- base::checked_cast<int>(buffer->size) -
- base::checked_cast<int>(old_size);
- max_used_transfer_buffer_usage_bytes_ =
- std::max(max_used_transfer_buffer_usage_bytes_,
- current_used_transfer_buffer_usage_bytes_);
}
void TestWebGraphicsContext3D::pixelStorei(GLenum pname, GLint param) {
@@ -773,14 +762,8 @@ void TestWebGraphicsContext3D::RetireRenderbufferId(GLuint id) {
namespace_->renderbuffer_set.erase(id);
}
-void TestWebGraphicsContext3D::SetMaxTransferBufferUsageBytes(
- size_t max_transfer_buffer_usage_bytes) {
- test_capabilities_.max_transfer_buffer_usage_bytes =
- max_transfer_buffer_usage_bytes;
-}
-
void TestWebGraphicsContext3D::SetMaxSamples(int max_samples) {
- test_capabilities_.gpu.max_samples = max_samples;
+ test_capabilities_.max_samples = max_samples;
}
TestWebGraphicsContext3D::TextureTargets::TextureTargets() {
« no previous file with comments | « cc/test/test_web_graphics_context_3d.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698