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

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: Created 8 years, 1 month 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 "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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 context->makeContextCurrent(); 117 context->makeContextCurrent();
118 gfx::GLContext* gl_context = gfx::GLContext::GetCurrent(); 118 gfx::GLContext* gl_context = gfx::GLContext::GetCurrent();
119 bool vsync = !command_line->HasSwitch(switches::kDisableGpuVsync); 119 bool vsync = !command_line->HasSwitch(switches::kDisableGpuVsync);
120 gl_context->SetSwapInterval(vsync ? 1 : 0); 120 gl_context->SetSwapInterval(vsync ? 1 : 0);
121 gl_context->ReleaseCurrent(NULL); 121 gl_context->ReleaseCurrent(NULL);
122 } 122 }
123 return context; 123 return context;
124 } 124 }
125 125
126 Texture::Texture(bool flipped, const gfx::Size& size, float device_scale_factor) 126 Texture::Texture(bool flipped, const gfx::Size& size, float device_scale_factor)
127 : flipped_(flipped), 127 : size_(size),
128 size_(size), 128 flipped_(flipped),
129 device_scale_factor_(device_scale_factor) { 129 device_scale_factor_(device_scale_factor) {
130 } 130 }
131 131
132 Texture::~Texture() { 132 Texture::~Texture() {
133 } 133 }
134 134
135 Compositor::Compositor(CompositorDelegate* delegate, 135 Compositor::Compositor(CompositorDelegate* delegate,
136 gfx::AcceleratedWidget widget) 136 gfx::AcceleratedWidget widget)
137 : delegate_(delegate), 137 : delegate_(delegate),
138 root_layer_(NULL), 138 root_layer_(NULL),
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 435
436 COMPOSITOR_EXPORT void DisableTestCompositor() { 436 COMPOSITOR_EXPORT void DisableTestCompositor() {
437 test_compositor_enabled = false; 437 test_compositor_enabled = false;
438 } 438 }
439 439
440 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() { 440 COMPOSITOR_EXPORT bool IsTestCompositorEnabled() {
441 return test_compositor_enabled; 441 return test_compositor_enabled;
442 } 442 }
443 443
444 } // namespace ui 444 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698