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

Side by Side Diff: cc/software_renderer.cc

Issue 11410021: Remove WTF and WebCore from cc/ and webkit/compositor_bindings/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix content_browsertests Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « cc/skpicture_content_layer_updater.cc ('k') | cc/software_renderer_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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "config.h"
6
7 #include "cc/software_renderer.h" 5 #include "cc/software_renderer.h"
8 6
9 #include "cc/debug_border_draw_quad.h" 7 #include "cc/debug_border_draw_quad.h"
10 #include "cc/render_pass_draw_quad.h" 8 #include "cc/render_pass_draw_quad.h"
11 #include "cc/solid_color_draw_quad.h" 9 #include "cc/solid_color_draw_quad.h"
12 #include "cc/texture_draw_quad.h" 10 #include "cc/texture_draw_quad.h"
13 #include "cc/tile_draw_quad.h" 11 #include "cc/tile_draw_quad.h"
14 #include "third_party/skia/include/core/SkCanvas.h" 12 #include "third_party/skia/include/core/SkCanvas.h"
15 #include "third_party/skia/include/core/SkColor.h" 13 #include "third_party/skia/include/core/SkColor.h"
16 #include "third_party/skia/include/core/SkMatrix.h" 14 #include "third_party/skia/include/core/SkMatrix.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 159
162 bool SoftwareRenderer::isSoftwareResource(ResourceProvider::ResourceId id) const 160 bool SoftwareRenderer::isSoftwareResource(ResourceProvider::ResourceId id) const
163 { 161 {
164 switch (m_resourceProvider->resourceType(id)) { 162 switch (m_resourceProvider->resourceType(id)) {
165 case ResourceProvider::GLTexture: 163 case ResourceProvider::GLTexture:
166 return false; 164 return false;
167 case ResourceProvider::Bitmap: 165 case ResourceProvider::Bitmap:
168 return true; 166 return true;
169 } 167 }
170 168
171 CRASH(); 169 LOG(FATAL) << "Invalid resource type.";
172 return false; 170 return false;
173 } 171 }
174 172
175 void SoftwareRenderer::drawQuad(DrawingFrame& frame, const DrawQuad* quad) 173 void SoftwareRenderer::drawQuad(DrawingFrame& frame, const DrawQuad* quad)
176 { 174 {
177 WebTransformationMatrix quadRectMatrix; 175 WebTransformationMatrix quadRectMatrix;
178 quadRectTransform(&quadRectMatrix, quad->quadTransform(), quad->quadRect()); 176 quadRectTransform(&quadRectMatrix, quad->quadTransform(), quad->quadRect());
179 WebTransformationMatrix contentsDeviceTransform = (frame.windowMatrix * fram e.projectionMatrix * quadRectMatrix).to2dTransform(); 177 WebTransformationMatrix contentsDeviceTransform = (frame.windowMatrix * fram e.projectionMatrix * quadRectMatrix).to2dTransform();
180 SkMatrix skDeviceMatrix; 178 SkMatrix skDeviceMatrix;
181 toSkMatrix(&skDeviceMatrix, contentsDeviceTransform); 179 toSkMatrix(&skDeviceMatrix, contentsDeviceTransform);
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 } 355 }
358 356
359 void SoftwareRenderer::setVisible(bool visible) 357 void SoftwareRenderer::setVisible(bool visible)
360 { 358 {
361 if (m_visible == visible) 359 if (m_visible == visible)
362 return; 360 return;
363 m_visible = visible; 361 m_visible = visible;
364 } 362 }
365 363
366 } // namespace cc 364 } // namespace cc
OLDNEW
« no previous file with comments | « cc/skpicture_content_layer_updater.cc ('k') | cc/software_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698