| OLD | NEW |
| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 FROM_HERE, | 81 FROM_HERE, |
| 82 base::Bind(&ReflectorImpl::DeleteOnMainThread, | 82 base::Bind(&ReflectorImpl::DeleteOnMainThread, |
| 83 scoped_refptr<ReflectorImpl>(this))); | 83 scoped_refptr<ReflectorImpl>(this))); |
| 84 } | 84 } |
| 85 | 85 |
| 86 // This must be called on ImplThread, or before the surface is passed to | 86 // This must be called on ImplThread, or before the surface is passed to |
| 87 // ImplThread. | 87 // ImplThread. |
| 88 void ReflectorImpl::AttachToOutputSurface( | 88 void ReflectorImpl::AttachToOutputSurface( |
| 89 BrowserCompositorOutputSurface* output_surface) { | 89 BrowserCompositorOutputSurface* output_surface) { |
| 90 gl_helper_.reset( | 90 gl_helper_.reset( |
| 91 new GLHelper(output_surface->context_provider()->Context3d(), | 91 new GLHelper(output_surface->context_provider()->ContextGL(), |
| 92 output_surface->context_provider()->ContextSupport())); | 92 output_surface->context_provider()->ContextSupport())); |
| 93 output_surface->SetReflector(this); | 93 output_surface->SetReflector(this); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void ReflectorImpl::OnMirroringCompositorResized() { | 96 void ReflectorImpl::OnMirroringCompositorResized() { |
| 97 mirroring_compositor_->ScheduleFullRedraw(); | 97 mirroring_compositor_->ScheduleFullRedraw(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 void ReflectorImpl::OnLostResources() { | 100 void ReflectorImpl::OnLostResources() { |
| 101 shared_texture_ = NULL; | 101 shared_texture_ = NULL; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 int y = size.height() - rect.y() - rect.height(); | 173 int y = size.height() - rect.y() - rect.height(); |
| 174 gfx::Rect new_rect(rect.x(), y, rect.width(), rect.height()); | 174 gfx::Rect new_rect(rect.x(), y, rect.width(), rect.height()); |
| 175 mirroring_layer_->SchedulePaint(new_rect); | 175 mirroring_layer_->SchedulePaint(new_rect); |
| 176 } | 176 } |
| 177 | 177 |
| 178 void ReflectorImpl::FullRedrawContentOnMainThread() { | 178 void ReflectorImpl::FullRedrawContentOnMainThread() { |
| 179 mirrored_compositor_->ScheduleFullRedraw(); | 179 mirrored_compositor_->ScheduleFullRedraw(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 } // namespace content | 182 } // namespace content |
| OLD | NEW |