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

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

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 10 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/BUILD.gn ('k') | cc/cc.gyp » ('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 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/blink/web_display_item_list_impl.h" 7 #include "cc/blink/web_display_item_list_impl.h"
8 #include "cc/layers/content_layer.h" 8 #include "cc/layers/content_layer.h"
9 #include "cc/layers/picture_layer.h" 9 #include "cc/layers/picture_layer.h"
10 #include "third_party/WebKit/public/platform/WebContentLayerClient.h" 10 #include "third_party/WebKit/public/platform/WebContentLayerClient.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 // TODO(danakj): Stop passing this to blink it should always use LCD when it
58 // wants to. crbug.com/430617
59 bool can_use_lcd_text = true;
60 client_->paintContents( 57 client_->paintContents(
61 canvas, clip, can_use_lcd_text, 58 canvas, clip,
62 graphics_context_status == ContentLayerClient::GRAPHICS_CONTEXT_ENABLED 59 graphics_context_status == ContentLayerClient::GRAPHICS_CONTEXT_ENABLED
63 ? blink::WebContentLayerClient::GraphicsContextEnabled 60 ? blink::WebContentLayerClient::GraphicsContextEnabled
64 : blink::WebContentLayerClient::GraphicsContextDisabled); 61 : blink::WebContentLayerClient::GraphicsContextDisabled);
65 } 62 }
66 63
67 scoped_refptr<cc::DisplayItemList> 64 scoped_refptr<cc::DisplayItemList>
68 WebContentLayerImpl::PaintContentsToDisplayList( 65 WebContentLayerImpl::PaintContentsToDisplayList(
69 const gfx::Rect& clip, 66 const gfx::Rect& clip,
70 ContentLayerClient::GraphicsContextStatus graphics_context_status) { 67 ContentLayerClient::GraphicsContextStatus graphics_context_status) {
71 if (!client_) 68 if (!client_)
72 return cc::DisplayItemList::Create(); 69 return cc::DisplayItemList::Create();
73 70
74 WebDisplayItemListImpl list; 71 WebDisplayItemListImpl list;
75 bool can_use_lcd_text = true;
76 client_->paintContents( 72 client_->paintContents(
77 &list, clip, can_use_lcd_text, 73 &list, clip,
78 graphics_context_status == ContentLayerClient::GRAPHICS_CONTEXT_ENABLED 74 graphics_context_status == ContentLayerClient::GRAPHICS_CONTEXT_ENABLED
79 ? blink::WebContentLayerClient::GraphicsContextEnabled 75 ? blink::WebContentLayerClient::GraphicsContextEnabled
80 : blink::WebContentLayerClient::GraphicsContextDisabled); 76 : blink::WebContentLayerClient::GraphicsContextDisabled);
81 return list.ToDisplayItemList(); 77 return list.ToDisplayItemList();
82 } 78 }
83 79
84 bool WebContentLayerImpl::FillsBoundsCompletely() const { 80 bool WebContentLayerImpl::FillsBoundsCompletely() const {
85 return false; 81 return false;
86 } 82 }
87 83
88 } // namespace cc_blink 84 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/BUILD.gn ('k') | cc/cc.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698