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

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

Issue 2889653002: Remove cullRect() from PaintOpBuffer. (Closed)
Patch Set: movecullrect2 rebase-once-and-for-all Created 3 years, 7 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 | « cc/blink/web_display_item_list_impl.cc ('k') | cc/paint/discardable_image_map_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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_image_layer.h" 5 #include "cc/layers/picture_image_layer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "cc/layers/picture_layer_impl.h" 9 #include "cc/layers/picture_layer_impl.h"
10 #include "cc/paint/drawing_display_item.h" 10 #include "cc/paint/drawing_display_item.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 SkScalar content_to_layer_scale_y = SkFloatToScalar( 71 SkScalar content_to_layer_scale_y = SkFloatToScalar(
72 static_cast<float>(bounds().height()) / image_.sk_image()->height()); 72 static_cast<float>(bounds().height()) / image_.sk_image()->height());
73 canvas->scale(content_to_layer_scale_x, content_to_layer_scale_y); 73 canvas->scale(content_to_layer_scale_x, content_to_layer_scale_y);
74 74
75 // Because Android WebView resourceless software draw mode rasters directly 75 // Because Android WebView resourceless software draw mode rasters directly
76 // to the root canvas, this draw must use the kSrcOver_Mode so that 76 // to the root canvas, this draw must use the kSrcOver_Mode so that
77 // transparent images blend correctly. 77 // transparent images blend correctly.
78 canvas->drawImage(image_, 0, 0); 78 canvas->drawImage(image_, 0, 0);
79 79
80 display_list->CreateAndAppendDrawingItem<DrawingDisplayItem>( 80 display_list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
81 PaintableRegion(), recorder.finishRecordingAsPicture()); 81 PaintableRegion(), recorder.finishRecordingAsPicture(),
82 gfx::RectToSkRect(PaintableRegion()));
82 83
83 display_list->Finalize(); 84 display_list->Finalize();
84 return display_list; 85 return display_list;
85 } 86 }
86 87
87 bool PictureImageLayer::FillsBoundsCompletely() const { 88 bool PictureImageLayer::FillsBoundsCompletely() const {
88 return false; 89 return false;
89 } 90 }
90 91
91 size_t PictureImageLayer::GetApproximateUnsharedMemoryUsage() const { 92 size_t PictureImageLayer::GetApproximateUnsharedMemoryUsage() const {
92 return 0; 93 return 0;
93 } 94 }
94 95
95 } // namespace cc 96 } // namespace cc
OLDNEW
« no previous file with comments | « cc/blink/web_display_item_list_impl.cc ('k') | cc/paint/discardable_image_map_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698