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

Side by Side Diff: gpu/perftests/texture_upload_perftest.cc

Issue 988693005: Chromium roll (https://codereview.chromium.org/976353002) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fixed bad android build patch Created 5 years, 9 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
« no previous file with comments | « gpu/perftests/run_all_tests.cc ('k') | mojo/application/content_handler_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <algorithm> 5 #include <algorithm>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/containers/small_map.h" 8 #include "base/containers/small_map.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 glDeleteProgram(program_object_); 186 glDeleteProgram(program_object_);
187 glDeleteShader(vertex_shader_); 187 glDeleteShader(vertex_shader_);
188 glDeleteShader(fragment_shader_); 188 glDeleteShader(fragment_shader_);
189 glDeleteBuffersARB(1, &vertex_buffer_); 189 glDeleteBuffersARB(1, &vertex_buffer_);
190 190
191 glBindFramebufferEXT(GL_FRAMEBUFFER, 0); 191 glBindFramebufferEXT(GL_FRAMEBUFFER, 0);
192 glDeleteFramebuffersEXT(1, &framebuffer_object_); 192 glDeleteFramebuffersEXT(1, &framebuffer_object_);
193 glDeleteTextures(1, &color_texture_); 193 glDeleteTextures(1, &color_texture_);
194 CheckNoGlError(); 194 CheckNoGlError();
195 195
196 gpu_timing_client_ = nullptr;
196 gl_context_ = nullptr; 197 gl_context_ = nullptr;
197 surface_ = nullptr; 198 surface_ = nullptr;
198 } 199 }
199 200
200 protected: 201 protected:
201 // Upload and draw on the offscren surface. 202 // Upload and draw on the offscren surface.
202 // Return a list of pair. Each pair describe a gl operation and the wall 203 // Return a list of pair. Each pair describe a gl operation and the wall
203 // time elapsed in milliseconds. 204 // time elapsed in milliseconds.
204 std::vector<Measurement> UploadAndDraw(const gfx::Size& size, 205 std::vector<Measurement> UploadAndDraw(const gfx::Size& size,
205 const std::vector<uint8>& pixels, 206 const std::vector<uint8>& pixels,
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 325
325 DCHECK_NE(0u, framebuffer_object_); 326 DCHECK_NE(0u, framebuffer_object_);
326 glBindFramebufferEXT(GL_FRAMEBUFFER, framebuffer_object_); 327 glBindFramebufferEXT(GL_FRAMEBUFFER, framebuffer_object_);
327 328
328 RunUploadAndDrawMultipleTimes(size); 329 RunUploadAndDrawMultipleTimes(size);
329 } 330 }
330 } 331 }
331 332
332 } // namespace 333 } // namespace
333 } // namespace gpu 334 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/perftests/run_all_tests.cc ('k') | mojo/application/content_handler_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698