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

Side by Side Diff: ui/aura/bench/bench_main.cc

Issue 10386206: RefCounted types should not have public destructors, chromeos edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to r143931 Created 8 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
« no previous file with comments | « ui/app_list/app_list_item_view.cc ('k') | ui/aura/root_window.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 (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 "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/i18n/icu_util.h" 8 #include "base/i18n/icu_util.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 context_->bindTexture(GL_TEXTURE_2D, texture_id()); 135 context_->bindTexture(GL_TEXTURE_2D, texture_id());
136 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 136 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
137 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 137 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
138 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 138 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
139 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 139 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
140 context_->texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 140 context_->texImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
141 size.width(), size.height(), 0, 141 size.width(), size.height(), 0,
142 GL_RGBA, GL_UNSIGNED_BYTE, NULL); 142 GL_RGBA, GL_UNSIGNED_BYTE, NULL);
143 } 143 }
144 144
145 private:
145 virtual ~WebGLTexture() { 146 virtual ~WebGLTexture() {
146 context_->deleteTexture(texture_id()); 147 context_->deleteTexture(texture_id());
147 } 148 }
148 149
149 private:
150 WebGraphicsContext3D* context_; 150 WebGraphicsContext3D* context_;
151 151
152 DISALLOW_COPY_AND_ASSIGN(WebGLTexture); 152 DISALLOW_COPY_AND_ASSIGN(WebGLTexture);
153 }; 153 };
154 154
155 // A benchmark that adds a texture layer that is updated every frame. 155 // A benchmark that adds a texture layer that is updated every frame.
156 class WebGLBench : public BenchCompositorObserver { 156 class WebGLBench : public BenchCompositorObserver {
157 public: 157 public:
158 WebGLBench(Layer* parent, Compositor* compositor, int max_frames) 158 WebGLBench(Layer* parent, Compositor* compositor, int max_frames)
159 : BenchCompositorObserver(max_frames), 159 : BenchCompositorObserver(max_frames),
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 #endif 329 #endif
330 330
331 root_window->ShowRootWindow(); 331 root_window->ShowRootWindow();
332 MessageLoopForUI::current()->Run(); 332 MessageLoopForUI::current()->Run();
333 root_window.reset(); 333 root_window.reset();
334 334
335 ui::CompositorTestSupport::Terminate(); 335 ui::CompositorTestSupport::Terminate();
336 336
337 return 0; 337 return 0;
338 } 338 }
OLDNEW
« no previous file with comments | « ui/app_list/app_list_item_view.cc ('k') | ui/aura/root_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698