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

Side by Side Diff: cc/layers/picture_layer.cc

Issue 2809653002: cc: Fix a bug of preventing conversion from non-tiled mask to tiled mask. (Closed)
Patch Set: Created 3 years, 8 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 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/layers/picture_layer.h" 5 #include "cc/layers/picture_layer.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "cc/layers/content_layer_client.h" 9 #include "cc/layers/content_layer_client.h"
10 #include "cc/layers/picture_layer_impl.h" 10 #include "cc/layers/picture_layer_impl.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 last_updated_invalidation_.Clear(); 142 last_updated_invalidation_.Clear();
143 } 143 }
144 144
145 return updated; 145 return updated;
146 } 146 }
147 147
148 void PictureLayer::SetLayerMaskType(LayerMaskType mask_type) { 148 void PictureLayer::SetLayerMaskType(LayerMaskType mask_type) {
149 // We do not allow converting SINGLE_TEXTURE_MASK to MULTI_TEXTURE_MASK in 149 // We do not allow converting SINGLE_TEXTURE_MASK to MULTI_TEXTURE_MASK in
150 // order to avoid rerastering when a mask's transform is being animated. 150 // order to avoid rerastering when a mask's transform is being animated.
151 if (mask_type_ == LayerMaskType::SINGLE_TEXTURE_MASK && 151 if (mask_type_ == LayerMaskType::SINGLE_TEXTURE_MASK &&
152 LayerMaskType::MULTI_TEXTURE_MASK) 152 mask_type == LayerMaskType::MULTI_TEXTURE_MASK)
153 return; 153 return;
154 mask_type_ = mask_type; 154 mask_type_ = mask_type;
155 } 155 }
156 156
157 sk_sp<SkPicture> PictureLayer::GetPicture() const { 157 sk_sp<SkPicture> PictureLayer::GetPicture() const {
158 // We could either flatten the RecordingSource into a single SkPicture, or 158 // We could either flatten the RecordingSource into a single SkPicture, or
159 // paint a fresh one depending on what we intend to do with it. For now we 159 // paint a fresh one depending on what we intend to do with it. For now we
160 // just paint a fresh one to get consistent results. 160 // just paint a fresh one to get consistent results.
161 if (!DrawsContent()) 161 if (!DrawsContent())
162 return nullptr; 162 return nullptr;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 return false; 281 return false;
282 282
283 return true; 283 return true;
284 } 284 }
285 285
286 const DisplayItemList* PictureLayer::GetDisplayItemList() { 286 const DisplayItemList* PictureLayer::GetDisplayItemList() {
287 return picture_layer_inputs_.display_list.get(); 287 return picture_layer_inputs_.display_list.get();
288 } 288 }
289 289
290 } // namespace cc 290 } // 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