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

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

Issue 11194042: Implement TextureImageTransportSurface using texture mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win_aura DCHECK() Created 8 years 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/compositor/compositor.h ('k') | ui/gfx/native_widget_types.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 "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 context->makeContextCurrent(); 189 context->makeContextCurrent();
190 gfx::GLContext* gl_context = gfx::GLContext::GetCurrent(); 190 gfx::GLContext* gl_context = gfx::GLContext::GetCurrent();
191 bool vsync = !command_line->HasSwitch(switches::kDisableGpuVsync); 191 bool vsync = !command_line->HasSwitch(switches::kDisableGpuVsync);
192 gl_context->SetSwapInterval(vsync ? 1 : 0); 192 gl_context->SetSwapInterval(vsync ? 1 : 0);
193 gl_context->ReleaseCurrent(NULL); 193 gl_context->ReleaseCurrent(NULL);
194 } 194 }
195 return context; 195 return context;
196 } 196 }
197 197
198 Texture::Texture(bool flipped, const gfx::Size& size, float device_scale_factor) 198 Texture::Texture(bool flipped, const gfx::Size& size, float device_scale_factor)
199 : flipped_(flipped), 199 : size_(size),
200 size_(size), 200 flipped_(flipped),
201 device_scale_factor_(device_scale_factor) { 201 device_scale_factor_(device_scale_factor) {
202 } 202 }
203 203
204 Texture::~Texture() { 204 Texture::~Texture() {
205 } 205 }
206 206
207 CompositorLock::CompositorLock(Compositor* compositor) 207 CompositorLock::CompositorLock(Compositor* compositor)
208 : compositor_(compositor) { 208 : compositor_(compositor) {
209 MessageLoop::current()->PostDelayedTask( 209 MessageLoop::current()->PostDelayedTask(
210 FROM_HERE, 210 FROM_HERE,
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 600
601 COMPOSITOR_EXPORT void DisableTestCompositor() { 601 COMPOSITOR_EXPORT void DisableTestCompositor() {
602 test_compositor_enabled = false; 602 test_compositor_enabled = false;
603 } 603 }
604 604
605 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() { 605 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() {
606 return test_compositor_enabled; 606 return test_compositor_enabled;
607 } 607 }
608 608
609 } // namespace ui 609 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/gfx/native_widget_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698