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

Side by Side Diff: content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h

Issue 8233027: Support dynamic switching between integrated and discrete GPUs on Mac OS X. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CONTENT_RENDERER_GPU_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ 5 #ifndef CONTENT_RENDERER_GPU_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
6 #define CONTENT_RENDERER_GPU_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ 6 #define CONTENT_RENDERER_GPU_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #if defined(ENABLE_GPU) 9 #if defined(ENABLE_GPU)
10 10
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "content/renderer/gpu/renderer_gl_context.h" 15 #include "content/renderer/gpu/renderer_gl_context.h"
16 #include "googleurl/src/gurl.h" 16 #include "googleurl/src/gurl.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebGraphicsContext3D. h" 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebGraphicsContext3D. h"
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
20 #include "ui/gfx/gl/gpu_preference.h"
20 #include "ui/gfx/native_widget_types.h" 21 #include "ui/gfx/native_widget_types.h"
21 22
22 #if !defined(OS_MACOSX) 23 #if !defined(OS_MACOSX)
23 #define FLIP_FRAMEBUFFER_VERTICALLY 24 #define FLIP_FRAMEBUFFER_VERTICALLY
24 #endif 25 #endif
25 26
26 class GpuChannelHost; 27 class GpuChannelHost;
27 class CommandBufferProxy; 28 class CommandBufferProxy;
28 29
29 namespace gpu { 30 namespace gpu {
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 // "Fake" plugin window handle in browser process for the compositor's output. 472 // "Fake" plugin window handle in browser process for the compositor's output.
472 gfx::PluginWindowHandle plugin_handle_; 473 gfx::PluginWindowHandle plugin_handle_;
473 #endif 474 #endif
474 WebGraphicsContext3D::WebGraphicsContextLostCallback* context_lost_callback_; 475 WebGraphicsContext3D::WebGraphicsContextLostCallback* context_lost_callback_;
475 WGC3Denum context_lost_reason_; 476 WGC3Denum context_lost_reason_;
476 477
477 WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* 478 WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROMIUM*
478 swapbuffers_complete_callback_; 479 swapbuffers_complete_callback_;
479 480
480 WebKit::WebGraphicsContext3D::Attributes attributes_; 481 WebKit::WebGraphicsContext3D::Attributes attributes_;
482 gfx::GpuPreference gpu_preference_;
481 int cached_width_, cached_height_; 483 int cached_width_, cached_height_;
482 484
483 // For tracking which FBO is bound. 485 // For tracking which FBO is bound.
484 WebGLId bound_fbo_; 486 WebGLId bound_fbo_;
485 487
486 // Errors raised by synthesizeGLError(). 488 // Errors raised by synthesizeGLError().
487 std::vector<WGC3Denum> synthetic_errors_; 489 std::vector<WGC3Denum> synthetic_errors_;
488 490
489 base::WeakPtrFactory<WebGraphicsContext3DCommandBufferImpl> weak_ptr_factory_; 491 base::WeakPtrFactory<WebGraphicsContext3DCommandBufferImpl> weak_ptr_factory_;
490 492
491 #ifdef FLIP_FRAMEBUFFER_VERTICALLY 493 #ifdef FLIP_FRAMEBUFFER_VERTICALLY
492 scoped_array<uint8> scanline_; 494 scoped_array<uint8> scanline_;
493 void FlipVertically(uint8* framebuffer, 495 void FlipVertically(uint8* framebuffer,
494 unsigned int width, 496 unsigned int width,
495 unsigned int height); 497 unsigned int height);
496 #endif 498 #endif
497 }; 499 };
498 500
499 #endif // defined(ENABLE_GPU) 501 #endif // defined(ENABLE_GPU)
500 #endif // CONTENT_RENDERER_GPU_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ 502 #endif // CONTENT_RENDERER_GPU_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/gpu/renderer_gl_context.cc ('k') | content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698