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

Side by Side Diff: content/browser/aura/reflector_impl.cc

Issue 25596002: aura: Use Layer::SetShowPaintedContent to stop showing external content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: layer-showpaintedcontent: nits Created 7 years, 2 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 | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/aura/reflector_impl.h" 5 #include "content/browser/aura/reflector_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "content/browser/aura/browser_compositor_output_surface.h" 9 #include "content/browser/aura/browser_compositor_output_surface.h"
10 #include "content/common/gpu/client/gl_helper.h" 10 #include "content/common/gpu/client/gl_helper.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 new GLHelper(output_surface->context_provider()->Context3d())); 91 new GLHelper(output_surface->context_provider()->Context3d()));
92 output_surface->SetReflector(this); 92 output_surface->SetReflector(this);
93 } 93 }
94 94
95 void ReflectorImpl::OnMirroringCompositorResized() { 95 void ReflectorImpl::OnMirroringCompositorResized() {
96 mirroring_compositor_->ScheduleFullRedraw(); 96 mirroring_compositor_->ScheduleFullRedraw();
97 } 97 }
98 98
99 void ReflectorImpl::OnLostResources() { 99 void ReflectorImpl::OnLostResources() {
100 shared_texture_ = NULL; 100 shared_texture_ = NULL;
101 mirroring_layer_->SetExternalTexture(NULL); 101 mirroring_layer_->SetShowPaintedContent();
102 } 102 }
103 103
104 void ReflectorImpl::OnReshape(gfx::Size size) { 104 void ReflectorImpl::OnReshape(gfx::Size size) {
105 if (texture_size_ == size) 105 if (texture_size_ == size)
106 return; 106 return;
107 texture_size_ = size; 107 texture_size_ = size;
108 DCHECK(texture_id_); 108 DCHECK(texture_id_);
109 gl_helper_->ResizeTexture(texture_id_, size); 109 gl_helper_->ResizeTexture(texture_id_, size);
110 main_message_loop_->PostTask( 110 main_message_loop_->PostTask(
111 FROM_HERE, 111 FROM_HERE,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 int y = size.height() - rect.y() - rect.height(); 172 int y = size.height() - rect.y() - rect.height();
173 gfx::Rect new_rect(rect.x(), y, rect.width(), rect.height()); 173 gfx::Rect new_rect(rect.x(), y, rect.width(), rect.height());
174 mirroring_layer_->SchedulePaint(new_rect); 174 mirroring_layer_->SchedulePaint(new_rect);
175 } 175 }
176 176
177 void ReflectorImpl::FullRedrawContentOnMainThread() { 177 void ReflectorImpl::FullRedrawContentOnMainThread() {
178 mirrored_compositor_->ScheduleFullRedraw(); 178 mirrored_compositor_->ScheduleFullRedraw();
179 } 179 }
180 180
181 } // namespace content 181 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698