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

Side by Side Diff: cc/resources/image_layer_updater.cc

Issue 5831706594508800: cc: Cleanup Layer::SetNeedsDisplayInRect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/resources/image_layer_updater.h ('k') | 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/resources/image_layer_updater.h" 5 #include "cc/resources/image_layer_updater.h"
6 #include "cc/resources/prioritized_resource.h" 6 #include "cc/resources/prioritized_resource.h"
7 #include "cc/resources/resource_update_queue.h" 7 #include "cc/resources/resource_update_queue.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 gfx::Vector2d(clipped_source_rect.origin() - source_rect.origin()); 49 gfx::Vector2d(clipped_source_rect.origin() - source_rect.origin());
50 50
51 ResourceUpdate upload = ResourceUpdate::Create( 51 ResourceUpdate upload = ResourceUpdate::Create(
52 texture, &bitmap_, image_rect, clipped_source_rect, clipped_dest_offset); 52 texture, &bitmap_, image_rect, clipped_source_rect, clipped_dest_offset);
53 if (partial_update) 53 if (partial_update)
54 queue->AppendPartialUpload(upload); 54 queue->AppendPartialUpload(upload);
55 else 55 else
56 queue->AppendFullUpload(upload); 56 queue->AppendFullUpload(upload);
57 } 57 }
58 58
59 void ImageLayerUpdater::SetBitmap(const SkBitmap& bitmap) {
60 DCHECK(bitmap.pixelRef());
61 bitmap_ = bitmap;
62 }
63
64 bool ImageLayerUpdater::UsingBitmap(const SkBitmap& bitmap) const {
65 return bitmap.pixelRef() == bitmap_.pixelRef();
66 }
67
59 } // namespace cc 68 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/image_layer_updater.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698