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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 12212099: cc: remove FontAtlas (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 182043 Created 7 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 | « content/renderer/gpu/render_widget_compositor.h ('k') | ui/compositor/compositor.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/renderer/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/time.h" 10 #include "base/time.h"
11 #include "cc/font_atlas.h"
12 #include "cc/layer.h" 11 #include "cc/layer.h"
13 #include "cc/layer_tree_debug_state.h" 12 #include "cc/layer_tree_debug_state.h"
14 #include "cc/layer_tree_host.h" 13 #include "cc/layer_tree_host.h"
15 #include "cc/switches.h" 14 #include "cc/switches.h"
16 #include "cc/thread_impl.h" 15 #include "cc/thread_impl.h"
17 #include "content/renderer/gpu/compositor_thread.h" 16 #include "content/renderer/gpu/compositor_thread.h"
18 #include "content/renderer/render_thread_impl.h" 17 #include "content/renderer/render_thread_impl.h"
19 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeViewCli ent.h" 18 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeViewCli ent.h"
20 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" 19 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
21 #include "webkit/compositor_bindings/web_layer_impl.h" 20 #include "webkit/compositor_bindings/web_layer_impl.h"
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 void RenderWidgetCompositor::didCompleteSwapBuffers() { 371 void RenderWidgetCompositor::didCompleteSwapBuffers() {
373 widget_->didCompleteSwapBuffers(); 372 widget_->didCompleteSwapBuffers();
374 } 373 }
375 374
376 // TODO(jamesr): This goes through WebViewImpl just to do suppression, refactor 375 // TODO(jamesr): This goes through WebViewImpl just to do suppression, refactor
377 // that piece out. 376 // that piece out.
378 void RenderWidgetCompositor::scheduleComposite() { 377 void RenderWidgetCompositor::scheduleComposite() {
379 client_->scheduleComposite(); 378 client_->scheduleComposite();
380 } 379 }
381 380
382 scoped_ptr<cc::FontAtlas> RenderWidgetCompositor::createFontAtlas() {
383 int font_height;
384 WebRect ascii_to_web_rect_table[128];
385 gfx::Rect ascii_to_rect_table[128];
386 SkBitmap bitmap;
387
388 client_->createFontAtlas(bitmap, ascii_to_web_rect_table, font_height);
389
390 for (int i = 0; i < 128; ++i)
391 ascii_to_rect_table[i] = ascii_to_web_rect_table[i];
392
393 return cc::FontAtlas::create(bitmap, ascii_to_rect_table, font_height).Pass();
394 }
395
396 } // namespace content 381 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.h ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698