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

Side by Side Diff: content/browser/renderer_host/accelerated_surface_container_mac.cc

Issue 6665029: Adds a TransportDIB::Id value that is explicitly invalid and use it when compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mebbe this one compiles? Created 9 years, 9 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/browser/renderer_host/accelerated_surface_container_mac.h" 5 #include "content/browser/renderer_host/accelerated_surface_container_mac.h"
6 6
7 #include "app/surface/io_surface_support_mac.h" 7 #include "app/surface/io_surface_support_mac.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "content/browser/renderer_host/accelerated_surface_container_manager_ma c.h" 9 #include "content/browser/renderer_host/accelerated_surface_container_manager_ma c.h"
10 #include "webkit/plugins/npapi/webplugin.h" 10 #include "webkit/plugins/npapi/webplugin.h"
(...skipping 24 matching lines...) Expand all
35 // only contains garbage data. Update the surface in |set_was_painted_to()| 35 // only contains garbage data. Update the surface in |set_was_painted_to()|
36 // instead. 36 // instead.
37 width_ = width; 37 width_ = width;
38 height_ = height; 38 height_ = height;
39 } 39 }
40 40
41 void AcceleratedSurfaceContainerMac::SetSizeAndTransportDIB( 41 void AcceleratedSurfaceContainerMac::SetSizeAndTransportDIB(
42 int32 width, 42 int32 width,
43 int32 height, 43 int32 height,
44 TransportDIB::Handle transport_dib) { 44 TransportDIB::Handle transport_dib) {
45 if (TransportDIB::is_valid(transport_dib)) { 45 if (TransportDIB::is_valid_handle(transport_dib)) {
46 transport_dib_.reset(TransportDIB::Map(transport_dib)); 46 transport_dib_.reset(TransportDIB::Map(transport_dib));
47 EnqueueTextureForDeletion(); 47 EnqueueTextureForDeletion();
48 width_ = width; 48 width_ = width;
49 height_ = height; 49 height_ = height;
50 } 50 }
51 } 51 }
52 52
53 void AcceleratedSurfaceContainerMac::SetGeometry( 53 void AcceleratedSurfaceContainerMac::SetGeometry(
54 const webkit::npapi::WebPluginGeometry& geom) { 54 const webkit::npapi::WebPluginGeometry& geom) {
55 visible_ = geom.visible; 55 visible_ = geom.visible;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 } 224 }
225 225
226 void AcceleratedSurfaceContainerMac::EnqueueTextureForDeletion() { 226 void AcceleratedSurfaceContainerMac::EnqueueTextureForDeletion() {
227 if (texture_) { 227 if (texture_) {
228 DCHECK(texture_pending_deletion_ == 0); 228 DCHECK(texture_pending_deletion_ == 0);
229 texture_pending_deletion_ = texture_; 229 texture_pending_deletion_ = texture_;
230 texture_ = 0; 230 texture_ = 0;
231 } 231 }
232 } 232 }
233 233
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698