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

Unified Diff: content/browser/aura/reflector_impl.cc

Issue 23726015: All together now (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screencast_cap
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
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();
« no previous file with comments | « content/browser/aura/reflector_impl.h ('k') | content/browser/renderer_host/media/desktop_capture_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698