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

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

Issue 25596002: aura: Use Layer::SetShowPaintedContent to stop showing external content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: layer-showpaintedcontent: nits Created 7 years, 2 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 | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | ui/compositor/layer.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/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, 220 GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
221 GL_TEXTURE_2D, texture_->PrepareTexture(), 0); 221 GL_TEXTURE_2D, texture_->PrepareTexture(), 0);
222 context->clearColor(0.f, 1.f, 0.f, 1.f); 222 context->clearColor(0.f, 1.f, 0.f, 1.f);
223 context->clear(GL_COLOR_BUFFER_BIT); 223 context->clear(GL_COLOR_BUFFER_BIT);
224 context->flush(); 224 context->flush();
225 } 225 }
226 226
227 virtual ~WebGLBench() { 227 virtual ~WebGLBench() {
228 context_provider_->Context3d()->makeContextCurrent(); 228 context_provider_->Context3d()->makeContextCurrent();
229 context_provider_->Context3d()->deleteFramebuffer(fbo_); 229 context_provider_->Context3d()->deleteFramebuffer(fbo_);
230 webgl_.SetExternalTexture(NULL); 230 webgl_.SetShowPaintedContent();
231 texture_ = NULL; 231 texture_ = NULL;
232 compositor_->RemoveObserver(this); 232 compositor_->RemoveObserver(this);
233 } 233 }
234 234
235 virtual void Draw() OVERRIDE { 235 virtual void Draw() OVERRIDE {
236 if (do_draw_) { 236 if (do_draw_) {
237 WebKit::WebGraphicsContext3D* context = context_provider_->Context3d(); 237 WebKit::WebGraphicsContext3D* context = context_provider_->Context3d();
238 context->makeContextCurrent(); 238 context->makeContextCurrent();
239 context->clearColor((frames() % kFrames)*1.0/kFrames, 1.f, 0.f, 1.f); 239 context->clearColor((frames() % kFrames)*1.0/kFrames, 1.f, 0.f, 1.f);
240 context->clear(GL_COLOR_BUFFER_BIT); 240 context->clear(GL_COLOR_BUFFER_BIT);
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 ui::PrintLayerHierarchy(root_window->layer(), gfx::Point(100, 100)); 361 ui::PrintLayerHierarchy(root_window->layer(), gfx::Point(100, 100));
362 #endif 362 #endif
363 363
364 root_window->ShowRootWindow(); 364 root_window->ShowRootWindow();
365 base::MessageLoopForUI::current()->Run(); 365 base::MessageLoopForUI::current()->Run();
366 focus_client.reset(); 366 focus_client.reset();
367 root_window.reset(); 367 root_window.reset();
368 368
369 return 0; 369 return 0;
370 } 370 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | ui/compositor/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698