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

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

Issue 10941017: Change the scale factor of texture_size from the layer's one to an estimation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 TimeTicks start_time_; 128 TimeTicks start_time_;
129 int frames_; 129 int frames_;
130 int max_frames_; 130 int max_frames_;
131 131
132 DISALLOW_COPY_AND_ASSIGN(BenchCompositorObserver); 132 DISALLOW_COPY_AND_ASSIGN(BenchCompositorObserver);
133 }; 133 };
134 134
135 class WebGLTexture : public ui::Texture { 135 class WebGLTexture : public ui::Texture {
136 public: 136 public:
137 WebGLTexture(WebGraphicsContext3D* context, const gfx::Size& size) 137 WebGLTexture(WebGraphicsContext3D* context, const gfx::Size& size)
138 : ui::Texture(false, size), 138 : ui::Texture(false, size, 1.0f),
139 context_(context) { 139 context_(context) {
140 set_texture_id(context_->createTexture()); 140 set_texture_id(context_->createTexture());
141 context_->bindTexture(GL_TEXTURE_2D, texture_id()); 141 context_->bindTexture(GL_TEXTURE_2D, texture_id());
142 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 142 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
143 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 143 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
144 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 144 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
145 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 145 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
146 context_->texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 146 context_->texImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
147 size.width(), size.height(), 0, 147 size.width(), size.height(), 0,
148 GL_RGBA, GL_UNSIGNED_BYTE, NULL); 148 GL_RGBA, GL_UNSIGNED_BYTE, NULL);
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 345
346 root_window->ShowRootWindow(); 346 root_window->ShowRootWindow();
347 MessageLoopForUI::current()->Run(); 347 MessageLoopForUI::current()->Run();
348 focus_manager.reset(); 348 focus_manager.reset();
349 root_window.reset(); 349 root_window.reset();
350 350
351 ui::CompositorTestSupport::Terminate(); 351 ui::CompositorTestSupport::Terminate();
352 352
353 return 0; 353 return 0;
354 } 354 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698