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

Side by Side Diff: cc/blink/web_content_layer_impl.cc

Issue 572873005: cc: Stop passing the unused opaque rect out-param to blink. (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/blink/web_content_layer_impl.h" 5 #include "cc/blink/web_content_layer_impl.h"
6 6
7 #include "cc/layers/content_layer.h" 7 #include "cc/layers/content_layer.h"
8 #include "cc/layers/picture_layer.h" 8 #include "cc/layers/picture_layer.h"
9 #include "third_party/WebKit/public/platform/WebContentLayerClient.h" 9 #include "third_party/WebKit/public/platform/WebContentLayerClient.h"
10 #include "third_party/WebKit/public/platform/WebFloatPoint.h" 10 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 layer_->layer()->SetDrawCheckerboardForMissingTiles(enable); 47 layer_->layer()->SetDrawCheckerboardForMissingTiles(enable);
48 } 48 }
49 49
50 void WebContentLayerImpl::PaintContents( 50 void WebContentLayerImpl::PaintContents(
51 SkCanvas* canvas, 51 SkCanvas* canvas,
52 const gfx::Rect& clip, 52 const gfx::Rect& clip,
53 ContentLayerClient::GraphicsContextStatus graphics_context_status) { 53 ContentLayerClient::GraphicsContextStatus graphics_context_status) {
54 if (!client_) 54 if (!client_)
55 return; 55 return;
56 56
57 blink::WebFloatRect web_opaque;
58 client_->paintContents( 57 client_->paintContents(
59 canvas, 58 canvas,
60 clip, 59 clip,
61 can_use_lcd_text_, 60 can_use_lcd_text_,
62 web_opaque, // TODO(danakj): Remove this.
63 graphics_context_status == ContentLayerClient::GRAPHICS_CONTEXT_ENABLED 61 graphics_context_status == ContentLayerClient::GRAPHICS_CONTEXT_ENABLED
64 ? blink::WebContentLayerClient::GraphicsContextEnabled 62 ? blink::WebContentLayerClient::GraphicsContextEnabled
65 : blink::WebContentLayerClient::GraphicsContextDisabled); 63 : blink::WebContentLayerClient::GraphicsContextDisabled);
66 } 64 }
67 65
68 void WebContentLayerImpl::DidChangeLayerCanUseLCDText() { 66 void WebContentLayerImpl::DidChangeLayerCanUseLCDText() {
69 // It is important to make this comparison because the LCD text status 67 // It is important to make this comparison because the LCD text status
70 // here can get out of sync with that in the layer. 68 // here can get out of sync with that in the layer.
71 if (can_use_lcd_text_ == layer_->layer()->can_use_lcd_text()) 69 if (can_use_lcd_text_ == layer_->layer()->can_use_lcd_text())
72 return; 70 return;
73 71
74 // LCD text cannot be enabled once disabled. 72 // LCD text cannot be enabled once disabled.
75 if (layer_->layer()->can_use_lcd_text() && ignore_lcd_text_change_) 73 if (layer_->layer()->can_use_lcd_text() && ignore_lcd_text_change_)
76 return; 74 return;
77 75
78 can_use_lcd_text_ = layer_->layer()->can_use_lcd_text(); 76 can_use_lcd_text_ = layer_->layer()->can_use_lcd_text();
79 ignore_lcd_text_change_ = true; 77 ignore_lcd_text_change_ = true;
80 layer_->invalidate(); 78 layer_->invalidate();
81 } 79 }
82 80
83 bool WebContentLayerImpl::FillsBoundsCompletely() const { 81 bool WebContentLayerImpl::FillsBoundsCompletely() const {
84 return false; 82 return false;
85 } 83 }
86 84
87 } // namespace cc_blink 85 } // namespace cc_blink
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