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

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

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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_content_layer_impl.h ('k') | cc/blink/web_display_item_list_impl.h » ('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/layers/content_layer.h" 8 #include "cc/layers/content_layer.h"
8 #include "cc/layers/picture_layer.h" 9 #include "cc/layers/picture_layer.h"
9 #include "third_party/WebKit/public/platform/WebContentLayerClient.h" 10 #include "third_party/WebKit/public/platform/WebContentLayerClient.h"
10 #include "third_party/WebKit/public/platform/WebFloatPoint.h" 11 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
11 #include "third_party/WebKit/public/platform/WebFloatRect.h" 12 #include "third_party/WebKit/public/platform/WebFloatRect.h"
12 #include "third_party/WebKit/public/platform/WebRect.h" 13 #include "third_party/WebKit/public/platform/WebRect.h"
13 #include "third_party/WebKit/public/platform/WebSize.h" 14 #include "third_party/WebKit/public/platform/WebSize.h"
14 #include "third_party/skia/include/utils/SkMatrix44.h" 15 #include "third_party/skia/include/utils/SkMatrix44.h"
15 16
16 using cc::ContentLayer; 17 using cc::ContentLayer;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // TODO(danakj): Stop passing this to blink it should always use LCD when it 57 // TODO(danakj): Stop passing this to blink it should always use LCD when it
57 // wants to. crbug.com/430617 58 // wants to. crbug.com/430617
58 bool can_use_lcd_text = true; 59 bool can_use_lcd_text = true;
59 client_->paintContents( 60 client_->paintContents(
60 canvas, clip, can_use_lcd_text, 61 canvas, clip, can_use_lcd_text,
61 graphics_context_status == ContentLayerClient::GRAPHICS_CONTEXT_ENABLED 62 graphics_context_status == ContentLayerClient::GRAPHICS_CONTEXT_ENABLED
62 ? blink::WebContentLayerClient::GraphicsContextEnabled 63 ? blink::WebContentLayerClient::GraphicsContextEnabled
63 : blink::WebContentLayerClient::GraphicsContextDisabled); 64 : blink::WebContentLayerClient::GraphicsContextDisabled);
64 } 65 }
65 66
67 scoped_refptr<cc::DisplayItemList>
68 WebContentLayerImpl::PaintContentsToDisplayList(
69 const gfx::Rect& clip,
70 ContentLayerClient::GraphicsContextStatus graphics_context_status) {
71 if (!client_)
72 return cc::DisplayItemList::Create();
73
74 WebDisplayItemListImpl list;
75 #if WEB_DISPLAY_ITEM_LIST_IS_DEFINED
76 bool can_use_lcd_text = true;
77 client_->paintContents(
78 &list, clip, can_use_lcd_text,
79 graphics_context_status == ContentLayerClient::GRAPHICS_CONTEXT_ENABLED
80 ? blink::WebContentLayerClient::GraphicsContextEnabled
81 : blink::WebContentLayerClient::GraphicsContextDisabled);
82 #endif
83 return list.ToDisplayItemList();
84 }
85
66 bool WebContentLayerImpl::FillsBoundsCompletely() const { 86 bool WebContentLayerImpl::FillsBoundsCompletely() const {
67 return false; 87 return false;
68 } 88 }
69 89
70 } // namespace cc_blink 90 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/blink/web_content_layer_impl.h ('k') | cc/blink/web_display_item_list_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698