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

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

Issue 164226: linux: fix race in TransportDIB passing (Closed)
Patch Set: Add newline for clarity Created 11 years, 4 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
« no previous file with comments | « chrome/common/transport_dib_linux.cc ('k') | no next file » | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/plugin/webplugin_proxy.h" 5 #include "chrome/plugin/webplugin_proxy.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #if defined(OS_LINUX) 8 #if defined(OS_LINUX)
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 #endif 10 #endif
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 #elif defined (OS_LINUX) 629 #elif defined (OS_LINUX)
630 void WebPluginProxy::UpdateTransform() { 630 void WebPluginProxy::UpdateTransform() {
631 } 631 }
632 632
633 void WebPluginProxy::SetWindowlessBuffer( 633 void WebPluginProxy::SetWindowlessBuffer(
634 const TransportDIB::Handle& windowless_buffer, 634 const TransportDIB::Handle& windowless_buffer,
635 const TransportDIB::Handle& background_buffer) { 635 const TransportDIB::Handle& background_buffer) {
636 int width = delegate_->GetRect().width(); 636 int width = delegate_->GetRect().width();
637 int height = delegate_->GetRect().height(); 637 int height = delegate_->GetRect().height();
638 windowless_dib_.reset(TransportDIB::Map(windowless_buffer)); 638 windowless_dib_.reset(TransportDIB::Map(windowless_buffer));
639 windowless_canvas_.reset(windowless_dib_->GetPlatformCanvas(width, height)); 639 if (windowless_dib_.get()) {
640 windowless_canvas_.reset(windowless_dib_->GetPlatformCanvas(width, height));
641 } else {
642 // This can happen if the renderer has already destroyed the TransportDIB
643 // by the time we receive the handle, e.g. in case of multiple resizes.
644 windowless_canvas_.reset();
645 }
640 background_dib_.reset(TransportDIB::Map(background_buffer)); 646 background_dib_.reset(TransportDIB::Map(background_buffer));
641 if (background_dib_.get()) { 647 if (background_dib_.get()) {
642 background_canvas_.reset(background_dib_->GetPlatformCanvas(width, height)); 648 background_canvas_.reset(background_dib_->GetPlatformCanvas(width, height));
643 } else { 649 } else {
644 background_canvas_.reset(); 650 background_canvas_.reset();
645 } 651 }
646 } 652 }
647 #endif 653 #endif
648 654
649 void WebPluginProxy::CancelDocumentLoad() { 655 void WebPluginProxy::CancelDocumentLoad() {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 while (index != resource_clients_.end()) { 688 while (index != resource_clients_.end()) {
683 WebPluginResourceClient* client = (*index).second; 689 WebPluginResourceClient* client = (*index).second;
684 690
685 if (client == resource_client) { 691 if (client == resource_client) {
686 resource_clients_.erase(index++); 692 resource_clients_.erase(index++);
687 } else { 693 } else {
688 index++; 694 index++;
689 } 695 }
690 } 696 }
691 } 697 }
OLDNEW
« no previous file with comments | « chrome/common/transport_dib_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698