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

Side by Side Diff: content/plugin/webplugin_proxy.cc

Issue 9416017: Optionally clear PlatformCanvas instances. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Address style issues. Created 8 years, 10 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) 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 "content/plugin/webplugin_proxy.h" 5 #include "content/plugin/webplugin_proxy.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 // in our address space, or go wrong in some other way. 475 // in our address space, or go wrong in some other way.
476 HANDLE section; 476 HANDLE section;
477 DuplicateHandle(channel_->renderer_handle(), dib_handle, GetCurrentProcess(), 477 DuplicateHandle(channel_->renderer_handle(), dib_handle, GetCurrentProcess(),
478 &section, 478 &section,
479 STANDARD_RIGHTS_REQUIRED | FILE_MAP_READ | FILE_MAP_WRITE, 479 STANDARD_RIGHTS_REQUIRED | FILE_MAP_READ | FILE_MAP_WRITE,
480 FALSE, 0); 480 FALSE, 0);
481 scoped_ptr<skia::PlatformCanvas> canvas(new skia::PlatformCanvas); 481 scoped_ptr<skia::PlatformCanvas> canvas(new skia::PlatformCanvas);
482 if (!canvas->initialize( 482 if (!canvas->initialize(
483 window_rect.width(), 483 window_rect.width(),
484 window_rect.height(), 484 window_rect.height(),
485 true, 485 skia::PlatformDevice::FLAGS_OPAQUE |
486 skia::PlatformDevice::FLAGS_INITIALIZED,
Jeff Timanus 2012/02/23 22:14:10 This initialization is within a #if WIN block, so
486 section)) { 487 section)) {
487 canvas_out->reset(); 488 canvas_out->reset();
488 } 489 }
489 canvas_out->reset(canvas.release()); 490 canvas_out->reset(canvas.release());
490 // The canvas does not own the section so we need to close it now. 491 // The canvas does not own the section so we need to close it now.
491 CloseHandle(section); 492 CloseHandle(section);
492 } 493 }
493 494
494 void WebPluginProxy::SetWindowlessBuffers( 495 void WebPluginProxy::SetWindowlessBuffers(
495 const TransportDIB::Handle& windowless_buffer0, 496 const TransportDIB::Handle& windowless_buffer0,
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 // Retrieve the IME status from a plug-in and send it to a renderer process 776 // Retrieve the IME status from a plug-in and send it to a renderer process
776 // when the plug-in has updated it. 777 // when the plug-in has updated it.
777 int input_type; 778 int input_type;
778 gfx::Rect caret_rect; 779 gfx::Rect caret_rect;
779 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) 780 if (!delegate_->GetIMEStatus(&input_type, &caret_rect))
780 return; 781 return;
781 782
782 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); 783 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect));
783 } 784 }
784 #endif 785 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698