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

Side by Side Diff: ui/compositor/compositor.cc

Issue 11099029: Disable automatic flushes on compositor contexts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 8 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 | « gpu/command_buffer/client/cmd_buffer_helper.cc ('k') | no next file » | 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 "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/threading/thread_restrictions.h" 10 #include "base/threading/thread_restrictions.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 WebKit::WebGraphicsContext3D* DefaultContextFactory::CreateContextCommon( 97 WebKit::WebGraphicsContext3D* DefaultContextFactory::CreateContextCommon(
98 Compositor* compositor, 98 Compositor* compositor,
99 bool offscreen) { 99 bool offscreen) {
100 DCHECK(offscreen || compositor); 100 DCHECK(offscreen || compositor);
101 WebKit::WebGraphicsContext3D::Attributes attrs; 101 WebKit::WebGraphicsContext3D::Attributes attrs;
102 attrs.depth = false; 102 attrs.depth = false;
103 attrs.stencil = false; 103 attrs.stencil = false;
104 attrs.antialias = false; 104 attrs.antialias = false;
105 attrs.shareResources = true; 105 attrs.shareResources = true;
106 attrs.noAutomaticFlushes = !offscreen;
piman 2012/10/16 03:07:14 It's ignored anyway by WebGraphicsContext3DInProce
106 WebKit::WebGraphicsContext3D* context = 107 WebKit::WebGraphicsContext3D* context =
107 offscreen ? 108 offscreen ?
108 webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView( 109 webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView(
109 attrs, false) : 110 attrs, false) :
110 webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWindow( 111 webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWindow(
111 attrs, compositor->widget(), share_group_.get()); 112 attrs, compositor->widget(), share_group_.get());
112 if (!context) 113 if (!context)
113 return NULL; 114 return NULL;
114 115
115 CommandLine* command_line = CommandLine::ForCurrentProcess(); 116 CommandLine* command_line = CommandLine::ForCurrentProcess();
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 437
437 COMPOSITOR_EXPORT void DisableTestCompositor() { 438 COMPOSITOR_EXPORT void DisableTestCompositor() {
438 test_compositor_enabled = false; 439 test_compositor_enabled = false;
439 } 440 }
440 441
441 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() { 442 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() {
442 return test_compositor_enabled; 443 return test_compositor_enabled;
443 } 444 }
444 445
445 } // namespace ui 446 } // namespace ui
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/cmd_buffer_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698