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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 13126002: TextureLayer: clear texture id when clearing client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add SetNeedsDisplay Created 7 years, 8 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
« no previous file with comments | « cc/layers/texture_layer_unittest.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) 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 "webkit/plugins/ppapi/ppapi_plugin_instance.h" 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after
1702 if (!container_) 1702 if (!container_)
1703 return; 1703 return;
1704 1704
1705 bool want_layer = GetBackingTextureId(); 1705 bool want_layer = GetBackingTextureId();
1706 1706
1707 if (want_layer == !!texture_layer_.get() && 1707 if (want_layer == !!texture_layer_.get() &&
1708 layer_bound_to_fullscreen_ == !!fullscreen_container_) 1708 layer_bound_to_fullscreen_ == !!fullscreen_container_)
1709 return; 1709 return;
1710 1710
1711 if (texture_layer_) { 1711 if (texture_layer_) {
1712 texture_layer_->WillModifyTexture();
1713 texture_layer_->ClearClient(); 1712 texture_layer_->ClearClient();
1714 if (!layer_bound_to_fullscreen_) 1713 if (!layer_bound_to_fullscreen_)
1715 container_->setWebLayer(NULL); 1714 container_->setWebLayer(NULL);
1716 else if (fullscreen_container_) 1715 else if (fullscreen_container_)
1717 fullscreen_container_->SetLayer(NULL); 1716 fullscreen_container_->SetLayer(NULL);
1718 web_layer_.reset(); 1717 web_layer_.reset();
1719 texture_layer_ = NULL; 1718 texture_layer_ = NULL;
1720 } 1719 }
1721 if (want_layer) { 1720 if (want_layer) {
1722 DCHECK(bound_graphics_3d_.get()); 1721 DCHECK(bound_graphics_3d_.get());
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
2506 screen_size_for_fullscreen_ = gfx::Size(); 2505 screen_size_for_fullscreen_ = gfx::Size();
2507 WebElement element = container_->element(); 2506 WebElement element = container_->element();
2508 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); 2507 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_);
2509 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); 2508 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_);
2510 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); 2509 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_);
2511 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); 2510 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_);
2512 } 2511 }
2513 2512
2514 } // namespace ppapi 2513 } // namespace ppapi
2515 } // namespace webkit 2514 } // namespace webkit
OLDNEW
« no previous file with comments | « cc/layers/texture_layer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698