| Index: content/browser/aura/reflector_impl.cc
|
| diff --git a/content/browser/aura/reflector_impl.cc b/content/browser/aura/reflector_impl.cc
|
| index 78726ecdcc2716dbeacb09508b06f53996718d3e..8b63870ef883eeb630eef91ef23fc2e6324ef8db 100644
|
| --- a/content/browser/aura/reflector_impl.cc
|
| +++ b/content/browser/aura/reflector_impl.cc
|
| @@ -55,7 +55,7 @@ void ReflectorImpl::Shutdown() {
|
| void ReflectorImpl::ShutdownOnImplThread() {
|
| BrowserCompositorOutputSurface* output_surface =
|
| output_surface_map_->Lookup(surface_id_);
|
| - output_surface->SetReflector(NULL);
|
| + output_surface->RemoveObserver(this);
|
| gl_helper_.reset();
|
| // The instance must be deleted on main thread.
|
| main_message_loop_->PostTask(
|
| @@ -70,7 +70,7 @@ void ReflectorImpl::AttachToOutputSurface(
|
| BrowserCompositorOutputSurface* output_surface) {
|
| gl_helper_.reset(
|
| new GLHelper(output_surface->context_provider()->Context3d()));
|
| - output_surface->SetReflector(this);
|
| + output_surface->AddObserver(this);
|
| }
|
|
|
| void ReflectorImpl::OnMirroringCompositorResized() {
|
| @@ -82,7 +82,7 @@ void ReflectorImpl::OnLostResources() {
|
| mirroring_layer_->SetExternalTexture(NULL);
|
| }
|
|
|
| -void ReflectorImpl::OnReshape(gfx::Size size) {
|
| +void ReflectorImpl::OnReshape(const gfx::Size& size) {
|
| if (texture_size_ == size)
|
| return;
|
| texture_size_ = size;
|
| @@ -105,7 +105,7 @@ void ReflectorImpl::OnSwapBuffers() {
|
| texture_size_));
|
| }
|
|
|
| -void ReflectorImpl::OnPostSubBuffer(gfx::Rect rect) {
|
| +void ReflectorImpl::OnPostSubBuffer(const gfx::Rect& rect) {
|
| DCHECK(texture_id_);
|
| gl_helper_->CopyTextureSubImage(texture_id_, rect);
|
| main_message_loop_->PostTask(
|
| @@ -116,6 +116,11 @@ void ReflectorImpl::OnPostSubBuffer(gfx::Rect rect) {
|
| rect));
|
| }
|
|
|
| +void ReflectorImpl::OnDelete() {
|
| + // The output surface is expected to outlive this object.
|
| + NOTREACHED();
|
| +}
|
| +
|
| void ReflectorImpl::CreateSharedTexture() {
|
| texture_id_ =
|
| ImageTransportFactory::GetInstance()->GetGLHelper()->CreateTexture();
|
|
|