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

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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 TimeTicks start_time_; 127 TimeTicks start_time_;
128 int frames_; 128 int frames_;
129 int max_frames_; 129 int max_frames_;
130 130
131 DISALLOW_COPY_AND_ASSIGN(BenchCompositorObserver); 131 DISALLOW_COPY_AND_ASSIGN(BenchCompositorObserver);
132 }; 132 };
133 133
134 class WebGLTexture : public ui::Texture { 134 class WebGLTexture : public ui::Texture {
135 public: 135 public:
136 WebGLTexture(WebGraphicsContext3D* context, const gfx::Size& size) 136 WebGLTexture(WebGraphicsContext3D* context, const gfx::Size& size)
137 : ui::Texture(false, size), 137 : ui::Texture(false, size, 1.0f),
138 context_(context) { 138 context_(context) {
139 set_texture_id(context_->createTexture()); 139 set_texture_id(context_->createTexture());
140 context_->bindTexture(GL_TEXTURE_2D, texture_id()); 140 context_->bindTexture(GL_TEXTURE_2D, texture_id());
141 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 141 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
142 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 142 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
143 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 143 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
144 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 144 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
145 context_->texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 145 context_->texImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
146 size.width(), size.height(), 0, 146 size.width(), size.height(), 0,
147 GL_RGBA, GL_UNSIGNED_BYTE, NULL); 147 GL_RGBA, GL_UNSIGNED_BYTE, NULL);
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 #endif 340 #endif
341 341
342 root_window->ShowRootWindow(); 342 root_window->ShowRootWindow();
343 MessageLoopForUI::current()->Run(); 343 MessageLoopForUI::current()->Run();
344 root_window.reset(); 344 root_window.reset();
345 345
346 ui::CompositorTestSupport::Terminate(); 346 ui::CompositorTestSupport::Terminate();
347 347
348 return 0; 348 return 0;
349 } 349 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698