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: cc/surfaces/surface_factory.cc

Issue 582173003: Mark Surface as damaged when it receives a CopyOutputRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "cc/surfaces/surface_factory.h" 5 #include "cc/surfaces/surface_factory.h"
6 6
7 #include "cc/output/compositor_frame.h" 7 #include "cc/output/compositor_frame.h"
8 #include "cc/output/copy_output_request.h" 8 #include "cc/output/copy_output_request.h"
9 #include "cc/surfaces/surface.h" 9 #include "cc/surfaces/surface.h"
10 #include "cc/surfaces/surface_manager.h" 10 #include "cc/surfaces/surface_manager.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 void SurfaceFactory::RequestCopyOfSurface( 47 void SurfaceFactory::RequestCopyOfSurface(
48 SurfaceId surface_id, 48 SurfaceId surface_id,
49 scoped_ptr<CopyOutputRequest> copy_request) { 49 scoped_ptr<CopyOutputRequest> copy_request) {
50 OwningSurfaceMap::iterator it = surface_map_.find(surface_id); 50 OwningSurfaceMap::iterator it = surface_map_.find(surface_id);
51 if (it == surface_map_.end()) { 51 if (it == surface_map_.end()) {
52 copy_request->SendEmptyResult(); 52 copy_request->SendEmptyResult();
53 return; 53 return;
54 } 54 }
55 DCHECK(it->second->factory() == this); 55 DCHECK(it->second->factory() == this);
56 it->second->RequestCopyOfOutput(copy_request.Pass()); 56 it->second->RequestCopyOfOutput(copy_request.Pass());
57 manager_->SurfaceModified(surface_id);
57 } 58 }
58 59
59 void SurfaceFactory::ReceiveFromChild( 60 void SurfaceFactory::ReceiveFromChild(
60 const TransferableResourceArray& resources) { 61 const TransferableResourceArray& resources) {
61 holder_.ReceiveFromChild(resources); 62 holder_.ReceiveFromChild(resources);
62 } 63 }
63 64
64 void SurfaceFactory::RefResources(const TransferableResourceArray& resources) { 65 void SurfaceFactory::RefResources(const TransferableResourceArray& resources) {
65 holder_.RefResources(resources); 66 holder_.RefResources(resources);
66 } 67 }
67 68
68 void SurfaceFactory::UnrefResources(const ReturnedResourceArray& resources) { 69 void SurfaceFactory::UnrefResources(const ReturnedResourceArray& resources) {
69 holder_.UnrefResources(resources); 70 holder_.UnrefResources(resources);
70 } 71 }
71 72
72 } // namespace cc 73 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698