diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-03 23:54:31 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-03 23:54:31 +0000 |
commit | 2727c73679b340aaf11c41ed4e57ada626f9c5a5 (patch) | |
tree | 8ce56f37c1a07fad0b97a6d6abaf372f0239eb86 /chrome/plugin/command_buffer_stub_win.cc | |
parent | b49b27f504501ecafee601985176dcbad9540f56 (diff) | |
download | chromium_src-2727c73679b340aaf11c41ed4e57ada626f9c5a5.zip chromium_src-2727c73679b340aaf11c41ed4e57ada626f9c5a5.tar.gz chromium_src-2727c73679b340aaf11c41ed4e57ada626f9c5a5.tar.bz2 |
Removed GPU plugin.
Pepper 3D v2 does not use the GPU plugin. It is integrated with the accelerated compositor.
TEST=PPAPI 3D v2 still works, trybots
BUG=none
Review URL: http://codereview.chromium.org/6588090
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76840 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin/command_buffer_stub_win.cc')
-rw-r--r-- | chrome/plugin/command_buffer_stub_win.cc | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/chrome/plugin/command_buffer_stub_win.cc b/chrome/plugin/command_buffer_stub_win.cc deleted file mode 100644 index 11369a6..0000000 --- a/chrome/plugin/command_buffer_stub_win.cc +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include <windows.h> - -#include "chrome/plugin/command_buffer_stub.h" - -namespace { -const wchar_t* kPreviousWndProcProperty = L"CommandBufferStubPrevWndProc"; -const wchar_t* kCommandBufferStubProperty = L"CommandBufferStub"; - -// Message handler for the GPU plugin's child window. Used to intercept -// WM_PAINT events and forward repaint notifications to the client. -LRESULT WINAPI WndProc(HWND handle, - UINT message, - WPARAM w_param, - LPARAM l_param) { - WNDPROC previous_wnd_proc = reinterpret_cast<WNDPROC>( - ::GetProp(handle, kPreviousWndProcProperty)); - CommandBufferStub* stub = reinterpret_cast<CommandBufferStub*>( - ::GetProp(handle, kCommandBufferStubProperty)); - - switch (message) { - case WM_ERASEBKGND: - // Do not clear background. Avoids flickering. - return 1; - case WM_PAINT: - // Validate the whole window to prevent another WM_PAINT message. - ValidateRect(handle, NULL); - - // Notify client that the window is invalid and needs to be repainted. - stub->NotifyRepaint(); - - return 1; - default: - return CallWindowProc(previous_wnd_proc, - handle, - message, - w_param, - l_param); - } -} -} // namespace anonymous - -bool CommandBufferStub::InitializePlatformSpecific() { - // Subclass window. - WNDPROC previous_wnd_proc = reinterpret_cast<WNDPROC>( - ::GetWindowLongPtr(window_, GWLP_WNDPROC)); - ::SetProp(window_, - kPreviousWndProcProperty, - reinterpret_cast<HANDLE>(previous_wnd_proc)); - ::SetWindowLongPtr(window_, - GWLP_WNDPROC, - reinterpret_cast<LONG_PTR>(WndProc)); - - // Record pointer to this in window. - ::SetProp(window_, - kCommandBufferStubProperty, - reinterpret_cast<HANDLE>(this)); - - return true; -} - -void CommandBufferStub::DestroyPlatformSpecific() { - // Restore window. - WNDPROC previous_wnd_proc = reinterpret_cast<WNDPROC>( - ::GetProp(window_, kPreviousWndProcProperty)); - ::SetWindowLongPtr(window_, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>( - previous_wnd_proc)); - ::RemoveProp(window_, kPreviousWndProcProperty); - ::RemoveProp(window_, kCommandBufferStubProperty); -} |